Index: openacs-4/packages/ajaxhelper/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/doc/index.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ajaxhelper/www/doc/index.html 9 Feb 2006 08:35:42 -0000 1.1 +++ openacs-4/packages/ajaxhelper/www/doc/index.html 5 Apr 2006 06:38:42 -0000 1.2 @@ -53,7 +53,7 @@     @ah_sources;noquote@

Compiled Template:
-
<script<script type="text/javascript" src="/ajax/prototype/prototype.js"></script> 
<scriptscript>
<script type="text/javascript" src="/ajax/scriptaculous/slider.js"></script>
<scriptscript>
+
<script type="text/javascript" src="/ajax/scriptaculous/scriptaculous.js"></script>

The above TCL API generates the default sources that must be declared for you to be able to use the javascript -libraries Ajax Helper has support for overlibmws (DHTML callouts) and -RICO (other cinematic effects) in addition to scriptaculous.  -Scriptaculous is the default javascript library.
+effects. Ajax Helper has support for overlibmws (DHTML callouts) and +RICO (other cinematic effects) in addition to scriptaculous.

To generate the javascript sources for Rico :

@@ -97,7 +97,7 @@
NOTE :

-You can combine sources by doing this
+You can combine sources by doing something like this

    set ah_sources [ah::js_sources -default]
    append ah_sources [ah::js_sources -source @@ -112,140 +112,29 @@
Ajax Procedures :

-Prototype
has a pair of javascript functions that alllow +Scriptaculous has a pair of javascript functions that alllow programmers to use XMLHTTP. The ajax.updater and ajax.request functions. See http://wiki.script.aculo.us/scriptaculous/show/Ajax.Updater and http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request -for more information about these javascript functions.
+for more informaiton about the scriptaculous functions.

The TCL API is used like this

-    set request [ah::ajaxrequest -url -"/url/to/call"  -\
-            -            -            -            -     -pars -"parameter1=parameter_value&parameter1=parameter_value"  ]
+    set request [ah::ajaxrequest -url "/url/to/call" +-pars "parameter1=parameter_value&parameter1=parameter_value" +-options "asynchronous:true" ]

The above api will generate an ajax.request javascript function that is -best placed in an  event like "onClick".
+best placed in a javascript event.

    <a href="#" onClick="@request;noquote@">

-Consult the api-doc for more information about other parameters you can -pass on to the ah::ajaxrequest proc.

-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 :

-       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"]

-On the adp side, you can just put
-
-      @js_update_connections;noquote@
-
-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 :
-
-
Use ah::effects to generate javascript that allows you to -implement transitional and cinematic effects to html elements. You will -need to consult the scriptaculous documentation -http://wiki.script.aculo.us/scriptaculous/tags/effects to know what -kinds of -effects and what kinds of options you can pass to the effect script.
-
-The procedure is called in this manner :
-
-    set effect [ah::effect -element "container"
-            -            -               --effect "Fade"
-            -            -        -       -options "duration: 1.5"]
-NOTE :
-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 ...
-
-   set onmouseover [ah::bubblecallout -text " Contents of My -Popup" ]
-
-The adp file should have something like this ....
-  
-   <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
-
-    append scripts [ah::sortable -element "container"
-            -            -            -            -     -options -"tag:'div',only:'portlet',overlap:'horizontal',constraint:false,ghosting:false"]
-
-You adp page should contain a div with id attribute container. This -"container" should have subcontainers which the above script will make -sortable.
-
-
-

-
-
-
-
+