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.
New in Spry release 1.4 is a JavaScript function called Spry.utils.updateContent that you can use to update content in a web page without having to reload the entire page. The documentation for the various Spry capabilities (dataset functions, utility functions, widgets, and effects) has been much improved in this release. However, besides a sample web page that uses Spry.utils.updateContent, this function is not clearly explained in the documentation provided with release 1.4 (at least I could not find it - if there is documentation for this function please post a link to it in a comment).
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.
Bruce
http://dev.besavvy.com/Spry_P1_4_1214/samples/tabb...#
(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.
Spry.Utils.updateContent('apDiv1', 'frag1.html');
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:
tabView.addTab(new YAHOO.widget.Tab({
label: 'my label',
dataSrc: 'mypage.cfm',
active: true,
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.
http://www.adobe.com/cfusion/webforums/forum/categ...
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.
It looks like the Javascript (in the HTML page) is ignored when loading.
Can you help me?
With regards,
Rob
http://ubuntuforums.org/member.php?u=585086
http://www.pctools.com/forum/member.php?u=48688