seamusseamus
asked on
writing URL variables into flash embed script
Hi, I have the following two scripts. The first retrieves a url variable, the second is the flash embed script. I need to retrieve the "id" value from the URL string and place that in the flash embed script in two locations. Any ideas?
<SCRIPT type=text/javascript>
function get(name) {
var q = unescape(location.search.s ubstring(1 )).split(/ [=&]/);
for (var j=0; j<q.length; j+=2) {
if (q[j] == name) {
return q[j+1];
}
}
return "";
}
</SCRIPT>
<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="300">
<!--slideshow-->
<param name="movie" value="/content/images/sli deshow/sli deshow.swf ">
<param name="quality" value="high">
<param name="wmode" value="window">
<param name="flashvars" value="xml=/content/images /slideshow /[id from url string goes here].xml">
<embed src="/content/images/slide show/slide show.swf" width="500" height="300" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" wmode="window" flashvars="xml=/content/im ages/slide show/[id from url string goes here].xml"></embed>
</object>
<SCRIPT type=text/javascript>
function get(name) {
var q = unescape(location.search.s
for (var j=0; j<q.length; j+=2) {
if (q[j] == name) {
return q[j+1];
}
}
return "";
}
</SCRIPT>
<object classid="clsid:D27CDB6E-AE
<!--slideshow-->
<param name="movie" value="/content/images/sli
<param name="quality" value="high">
<param name="wmode" value="window">
<param name="flashvars" value="xml=/content/images
<embed src="/content/images/slide
</object>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for feedback.
ASKER
<script language="JavaScript">
document.write('<object classid="clsid:D27CDB6E-AE
document.write('://downloa
document.write(',0,0" width="500" height="300"> <!--slideshow--> <param name="movie" ');
document.write('value="/co
document.write('alue="high
document.write('rs" value="xml=/content/images
document.write('bed src="/content/images/slide
document.write('quality="h
document.write('pe="applic
document.write('mages/slid
</script>