First, include the subcomponent "ajax.html" containing the necessary javascript code. This must be done ONCE.
Then, place the input box with hooks to the javascript, and finally a DIV in which the AJAX return data will appear. A single page may have several of these, and each may use several input fields and return data to several DIV sections.
|
|||||
Note that our javascript code is derived from CGI::Ajax with a few modifications to work with HTML::Mason. Credit where credit is due.