How To Use Spry's Spry.utils.updateContent Function To Update Content Without Reloading The Web Page
Adobe released update 1.4 to their Spry ajax framework. You can learn more about Spry and download the 1.4 release here: http://labs.adobe.com/technologies/spry/. I'm impressed with Spry and how easy Spry makes complex ajax functions and DOM manipulation.
Since I plan on using this function on some web pages I'm currently updating, I wanted to ensure I understood how to use the function correctly. The Adobe sample web page provided in release 1.4 for Spry.utils.updateContent is a bit complex because that page's author combined a Spry effect with the updateContent function. I wanted to build my own example that just uses the updateContent function and also has lots of commenting in it so I can document how the updateContent function is working.
Please post a comment if my example and its explanation are not clear or if you have additional information on how to use the Spry.utils.updateContent function.
this is great.
I cannot think of anything in Spry 1.4 that would do exactly what you want.
(see the modified example with tab 1 text link triggering loading of an outside file).
The tricky part is to then use event listeners to detect the clicks and redirect. I think I will try merging the event code from yahoo with spry to see if that will work.
Where apDiv1 is content inside of the tab.
<div class="TabbedPanelsContent"><div id="apDiv1">Tab 1 content</div></div>
The way dynamic tabs work in Yahoo UI is something like:
label: 'my label',
cacheData: true /* only load once */
So the ability to set in one quick step the active tab, caching and the source (or static content) is handy. Of course you can do it with static html as well, which is very similar to spry.
Do you see the difference? It is certainly POSSIBLE now - I'd just like to see it done easier if that makes sense.
I have a DIV in which a HTML page can be loaded, using Spry. The loading is no problem, but the Spry effects are NOT visible.
Can you help me?