Welcome to WebmasterWorld Guest from 35.173.47.43

Forum Moderators: open

Message Too Old, No Replies

xml hell

dw spry js framework question

     
3:29 am on Jun 30, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 25, 2004
posts:161
votes: 0


Hi!
I have a page with a link:
<a href="randompage.html" onclick="divfader(this.href); return false;">

the divfader function looks like this:
var hpanel = new Spry.Widget.HTMLPanel("inhere",{evalScripts:true});

function divfader(theURL){
if (theURL.indexOf('#') != -1){} else {
var effectObs = {onPostEffect:function(){hpanel.loadContent(theURL);}};
var obs = {onPostUpdate:function(){openIt.start();}};
closeIt.start();
closeIt.addObserver(effectObs);
hpanel.addObserver(obs);
}
}

var closeIt = new Spry.Effect.Fade("inhere",{from:'100%',to:'0%',duration:2000});
var openIt = new Spry.Effect.Fade("inhere",{from:'0%',to:'100%',duration:2000});

if the href is anything but"#", then it will:
fade out the contents of the div "inhere"
load the external html data
fade back in again

however when the external html file contains spry data and regions, all i get is {variablename}.
I have turned on evalscripts, and alerts can pop up etc, but still no spry data!

i am led to believe the solution involves Spry.Data.updateAllRegions(); or initregions or something.
What and where would i put this?

the fragment html file looks like this:

<script type="text/javascript">
var ds1 = new Spry.Data.XMLDataSet("menu.xml", "menu/menuitem");
</script>

<p>Testing 123</p>

<div spry:region="ds1">
<table>
<tr spry:repeat="ds1">
<td>{@heading}</td>
<td>{@url}</td>
</tr>
</table>

Please help if you can!
Thanks
Derek :-)

8:54 pm on June 30, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 25, 2004
posts:161
votes: 0


Question:

Spry HTMLPanel loads content into a <div> - All good :-)
HTML Page with XMLDataset Dynamic Data - All Good :-)
HTMLPanel loading the XMLDataset HTML page - no variables display, only the variable {placeholders} - Not Good

PS other js works from the page like: alert('#*$!?');
Code as per my other post!

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members