4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 HELP: Two Mouseovers With A Difference ...
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
froggers
Junior WebHelper
Junior WebHelper


Joined: 22 Oct 2002
Posts: 1

PostPosted: Tue Oct 22, 2002 8:30 pm (14 years, 12 months ago) Reply with QuoteBack to Top

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?
OfflineView User's ProfileFind all posts by froggersSend Personal MessageSend email
verto
Senior WebHelper
Senior WebHelper


Joined: 14 Jan 2002
Posts: 220
Location: Cambridge MA USA

PostPosted: Wed Oct 23, 2002 12:04 am (14 years, 12 months ago) Reply with QuoteBack to Top

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 .: :. . : :....: :.: .: :.
OfflineView User's ProfileFind all posts by vertoSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.050241 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme