This content has been marked as final.
Show 2 replies
-
1. Re: How to duplicate this AJAX effect?
leonardinius Apr 17, 2008 12:35 PM (in response to vk101)Smth like this?
-
2. Re: How to duplicate this AJAX effect?
damianharvey.damianharvey.gmail.com Apr 17, 2008 3:35 PM (in response to vk101)You could use either Scriptaculous or jQuery. I find the rich:jQuery rather useful for nice showing/hiding of content. For example:
<rich:jQuery name="toggleSource" timing="onJScall" selector="#source" query="slideToggle('slow')" /> <a onclick="toggleSource();">View/Hide Source</a> <div id="source" style="display:none;"> lots of source code </div>
If you want to retrieve information from the server you can replace the <a> with an <a4j:commandLink> that calls whatever action you require, reRenders the content (based on the id) and then in the oncomplete attribute calls the javascript method to show the content (eg. toggleSource).
Cheers,
Damian.