Thanks Rob. It's still not working however. I'll assume based on your
example, that I can't have the function defined withing the quotes of the
write("") statement. but still not working.
Question. Do i need to have the document.write(... withing a <script> tag???
i've tried both but it doesn't work either way. Here's some of the page.
---------------------
<script language="javascript">
var locate = window.location // Get the link string
document.hiddenForm.hiddenInput.value = locate // put the link string into a
hidden form.
var text = document.hiddenForm.hiddenInput.value
function getVar(str){
theVar = str.indexOf("=") + 1;
return("myVar="+str.substring(theVar));
}
</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="500" height="500">
<param name="movie" value="varTest.swf">
document.write('<param name="flashVars" value="'+getVar(text)+'">');
<param name='menu' value='false'>"
<param name="quality" value="high">
</object>
<script language="javascript">alert(getVar(text)); //Tests fine </script>
</body>
</html>
---------------------
Thanks for the help!
"RobB" <fe******@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Keeko wrote: Actionscriptor needs help!
I have a working javascript function (getVar()) that extracts a
variable from a link and returns it. (tested with alert() works fine). But I
am unsure of how to right the following line.
document.write("<param name='flashVars' value=&{getVar(text)}>)
This is a param from an object tag (embedding flash) and i'm trying
to dynamically set the flashVars param, but this 1 line is killing me.
How do i properly right this line?
Many Thanks in advance..
document.write('<param name="flashVars" value="' + getVar(text) +
'">');