|
Author |
Message |
froggers
Junior WebHelper
Joined: 22 Oct 2002
Posts: 1
|
Posted:
Tue Oct 22, 2002 8:30 pm (21 years, 5 months ago) |
|
Can anyone help with the below problem ...
document.write("<td><a href=clips/"+genericname+".mpg onMouseOver=document."+genericname+".height='75'; document."+genericname+".dynsrc='clips/"+genericname+"mpg'; onMouseOut=document."+genericname+".dynsrc='"+genericname+".jpg'><img src=logos/"+genericname+".jpg name="+genericname+" border=0></a></td>");
This line is meant to be used in conjunction with a loop routine in <script> brackets within the main <body>. What it should do is display a file pictures and then play its mpg file on a mouseover, for a generic filename that can be changed. That i can do. The problem is within the line ...
onMouseOver=document."+genericname+".height='75'; document."+genericname+".dynsrc='clips/"+genericname+"mpg';
Here i want to play the mpg and keep its height at 75. The problem is that it doesn't work. I think that the two document strings should be surrounded by "...
onMouseOver= " document."+genericname+".height='75'; document."+genericname+".dynsrc='clips/"+genericname+"mpg'; "
However because i'm using the "+genericname+" command within the line, i can't use " to surround the two document strings. I've tried to do it as a function, but i can't get it to work as a generic function.
Can anyone PLEASE help me with this? |
|
|
|
|
verto
Senior WebHelper
Joined: 14 Jan 2002
Posts: 220
Location: Cambridge MA USA
|
Posted:
Wed Oct 23, 2002 12:04 am (21 years, 5 months ago) |
|
Not totally sure I understand the problem, but is it related to nesting your quotes?
Once you run out of quotes to nest, the usual solution is to 'escape' the innermost ones by using a backslash character, like so:
Code: | "<body onload="setTimeout('alert(\'this is a test\');', 200)"> |
This works with both single and double quotes:
Code: | "<body onload="setTimeout('alert(\"this is a test\");', 200)"> |
hope that helps |
________________________________ >>>>>>>>>>>>>
GENERAL DISCLAIMER:This disclaimer may be void where null in all cases unless explicitly not unprohibited or (p)re-exclusively assigned by sufficient presedimentation on behalf of every non-interested party to wit (or so it was said).
:::
.: :. . : :....: :.: .: :. verto .: :. . : :....: :.: .: :. |
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.2061 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |