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 :-)