Hamilton G. Chua (firstname.lastname@example.org)
Prototype v1.5.1 (http://prototype.conio.net/)
Scriptaculous v1.7.3 Beta (http://script.aculo.us/)
Curvey Corners (http://www.curvycorners.net/)
Yahoo User Interface Library 2.3.0 (http://developer.yahoo.com/yui/)
Dojo Toolkit 0.4 (http://dojotoolkit.com)
ExtJs 1.1.1 (http://extjs.com)
What's New :
- Added helpers for YUI menu, autocomplete and treeview.
- Added ExtJs helpers for Ext.onReady, Ext.Ajax and Ext.MessageBox
- Additional tests in ajaxhelper/www/tests
The ajax helper package must be installed and mounted in /ajax . The installer should automatically mount the ajax helper in /ajax/ upon installation of the package.
Lee Denison's template::head code must be available. This code will soon be committed to CVS head after consulting the community and some more testing.
In the mean time, you can find the files you need to implement template head from packages/ajaxhlper/www/docs. You should copy the files into the following locations
Ajax Procedures :
The Tcl API is used like this
set request [ah::ajaxrequest -url "/url/to/call" -pars "parameter1=parameter_value¶meter1=parameter_value"]
Consult the api-doc for more information about other parameters you can pass on to the ah::ajaxrequest proc.
<a href="#" onClick="@request;noquote@">Send Request</a>
The ah::ajaxrequest will make an xmlhttp call but does not do anything about the response. To update content based on the response from an xmlhttp request, use ah::ajaxupdate. This procedure will not only make an xmlhttp call but update the contents of a div or layer with the response text of the xmlhttp request.
Here's an example :
On the adp side, you can just put
set js_update_connections [ah::ajaxupdate -container "connections" \ -url "/url/to/call \ -enclose \ -pars "'effects=$effects&limit_n=$limit_n'" \ -effect "Fade" \ -effectopts "duration: 0.5"]
<a href="#" onClick="@js_update_connections;noquote@">Update</a>
The "-enclose" parameter tells the procedure to enclose the resulting script in script tags <script></script>. This is another option in addition to putting the scripts in html event attributes like onClick, onMouseover or onChange.
The "-pars" parameter is where you pass the querystring that you want to send along with the xmlhttp request. Notice that it takes the form of a querystring that you normally see in the address bar of your browser. Use this to pass values to the URL you are making an xmlhttp request to.
The "-effect" parameter is an optional parameter that allows you to specify the effect you want to execute after the container's content has been updated.
Cinematic Effects :
The procedure is called in this manner in the tcl file:
set effect [ah::effect -element "container" -effect "Fade" -options "duration: 1.5"]
<a href="#" onClick="@effect;noquote@">Show Effect</a>
The Effect name and the options are case sensitive.
DHTML Callouts :
There is currently basic support for overlibmws. Right now we are able to create bubble type call outs.
In your tcl file ...
The adp file should have something like this ....
set onmouseover [ah::bubblecallout -text " Contents of My Popup" ]
<a href="#" @onmouseover;noquote@ >Link with Popup</a>
Drag and Drop Sortables :
Sortables are documented in the scriptaculous wiki http://wiki.script.aculo.us/scriptaculous/show/Sortables.
For sortables to work you will need to define a container which will hold the elements you want to be sortable.
Here is what the script looks like
You adp page should contain a div with id attribute container. This "container" should have subcontainers which the above script will make sortable.
append scripts [ah::sortable -element "container" -options "tag:'div',only:'portlet',overlap:'horizontal',constraint:false,ghosting:false"]