
sriatoook.de
Apr 8, 2005, 8:32 PM
Post #3 of 7
(684 views)
Permalink
|
Am 07.04.2005 um 01:30 schrieb Sebastian Riedel: > Hi, > > You may have noticed that i released HTML::Ajax and > Catalyst::Plugin::Ajax to CPAN. > HTML::Ajax actually just contains a oo ajax implementation and a > helper to observe single fields. > > I would like to add much more! > > So if you've got something cool lying around, post it here. > > Very nice would be an ajax link generator or even a extended observer > for whole forms with all fields... ;) Ok, i've updated HTML::Ajax... :) SYNOPSIS use HTML::Ajax; my $ajax = HTML::Ajax->new; print $ajax->library; print $ajax->form_tag( $id, $url, $update ); print $ajax->observe_field( $id, $url, $frequency, $update, $param ); print $ajax->observe_form( $id, $url, $frequency, $update ); print $ajax->link_to( $url, $text, $update ); print $ajax->link_field( $id, $url, $text, $update, $param ); DESCRIPTION Some stuff to make Ajax fun. It's just a good beginning, more little helpers will come soon. METHODS $ajax->library Returns our library of Javascript functions and objects, in a script block. $ajax->form_tag( $id, $url, $update ) Returns a opening form tag using ajax instead of POST. id = DOM id for form url = url to request update = DOM id to change innerHTML with responseText $ajax->observe_field( $id, $url, $frequency, $update, $param ) Observes a field and makes a request for changes. id = DOM id of field to observe url = url to request frequency = frequency for observation (defaults to 2) update = DOM id to change innerHTML with responseText param = name of parameter for request (defaults to value) $ajax->observe_form( $id, $url, $frequency, $update ) Observes a whole form with all fields and makes a request for changes. id = DOM id of form to observe url = url to request frequency = frequency for observation (defaults to 2) update = DOM id to change innerHTML with responseText $ajax->link_to( $url, $text, $update ) Creates a link that makes a request when pressed. url = url to request text = link text or html update = DOM id to change innerHTML with responseText $ajax->link_field( $id, $url, $text, $update, $param ) Creates a link that submits a field value when pressed. id = DOM id of field to observe url = url to request text = link text or html update = DOM id to change innerHTML with responseText param = name of parameter for request (defaults to value) $ajax->raw_library Returns our library of Javascript functions and objects. -- sebastian
|