Skip to main content

Forcing Spry accordian redraw

3 replies [Last post]
jvence
Offline
Joined: 2006-06-21
Points: 0

I'm trying to automatically have a spry accordian redrawn when a specific event occurs - as the source data for the Spry accordian can change dynamically. Does any know how I can redraw a Spry Accordian component so that it goes and fetches the latest XML data?
Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Spry can be a bit tricky as it is generally rigged to load on the page on load.

Try: Spry.Data.initRegions() which will reparse the page.

If you know the id of the component you can also pass it in:

Spry.Data.initRegions(container);

Currently the bootstrap code does not keep a reference to the Spry widget but that could be changed pretty easy.

Let me know if this does not work for you.

jvence
Offline
Joined: 2006-06-21
Points: 0

That does not seem to work. Even tried a manual approach: Refresh

The component seems to redraw but somehow it does not fetch the latest data set. Is it possible that it's been cached. I noticed that if I turned-off caching on my browser and refreshed the page, then it does fetch the latest data set.

Any help is greatly appreciated.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

I have integrated a new version of Spry (1.2 preview) and updated the listener for events on the XML document. Can you try i now?