|
HTML::Ajax - Generate HTML and Javascript for Ajax |
HTML::Ajax - Generate HTML and Javascript for Ajax
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 );
Some stuff to make Ajax fun. It's just a good beginning, more little helpers will come soon.
Returns our library of Javascript functions and objects, in a script block.
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
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)
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
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
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)
Returns our library of Javascript functions and objects.
the Catalyst::Plugin::Ajax manpage, the Catalyst manpage.
Sebastian Riedel, sri@oook.de
Based on the work of Sascha Kiefer, esskar@cpan.org
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
|
HTML::Ajax - Generate HTML and Javascript for Ajax |