.
oldmanInAz - When asking about a Dynamic Drive Script, please post in the Dynamic Drive scripts help area and include a link to the script. I've moved this thread there and merged it with another similar thread of yours.
I'm assuming you mean:
http://www.dynamicdrive.com/dynamici...xsidepanel.htm
If so, with a small modification to that script (using a text only editor like NotePad, around line #49 change the highlighted line):
Code:
if (loadtype == "iframe"){
ddajaxsidepanel.$contentarea.html('<iframe src="javascript:false" style="border:0; margin:0; padding:0; width:100%; height:100%"></iframe>')
ddajaxsidepanel.$contentarea.find('iframe:eq(0)').attr('src', url)
}
else{
ddajaxsidepanel.$contentarea.load(url)
}
}
},
to:
Code:
ddajaxsidepanel.$contentarea.load(unescape(url))
This will allow you to specify an id selector separated by a space as part of the href:
Code:
<a href="table.htm" rel="ajaxpanel">Running Gun</a>
for example would become (notice the added space, and no space (only a comma) between the two selectors these are both important points):
Code:
<a href="table.htm #table_0,#table_1" rel="ajaxpanel">Running Gun</a>
Important Note: This will only work with AJAX imports, not with the data-loadtype="iframe" type links. And the script code in the head of table.htm:
Code:
<script type="text/javascript" src="js/audio-player.js"></script>
<script type="text/javascript">
AudioPlayer.setup("player/player.swf", {
width: 350,
initialvolume: 100
});
</script>
will not be brought over because only the table you've selected gets imported. You could put that script in the head of the 'top' page (sidepanel.html) though. That way it should be available to the content you're importing, at least in theory. If not we can make other arrangements for that part. But it might not be needed, it looks like the audio player object loads just fine without that script. I can't see how, but it looks like it is.
Edit: In local testing, using this method appears not to work with the Flash audio. I have a solution that works with it, but it's a bit complicated. I'll see if it can be simplified and, either way post it here soon.
But, if thepage is live, it might work simply by placing the script on the 'top' page as mentioned, try that and see. Because if that works, it's much easier that way.
Bookmarks