CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Other Programming Languages: Javascript:
Not enough quote symbols???

 



Merlin
journeyman

Apr 11, 2001, 12:06 PM

Post #1 of 3 (7417 views)
Not enough quote symbols??? Can't Post

Well, let's inaugurate this forum!
I'm using the following code in an anchor tag :
onMouseOut="MM_swapImgRestore();setTimeout(checkflagniveau2('menu2a','','hide'),500);"

The problem is I think I need to enclose the function call in setTimeout within quotes, only I'm using quotes around the onMouseout and single quotes for the arguments passed to the function. I'd need another type of quote to enclose tha thing... Anyone for a little help on this? Thx!



sleuth
Enthusiast

Apr 11, 2001, 2:17 PM

Post #2 of 3 (7414 views)
Re: Not enough quote symbols??? [In reply to] Can't Post

 
I don't think there's much else you can do as far as quotes go, I do think it's the problem though. A working example is

setTimeout("RefreshPage()", 30000);

and I see that you're trying to pass three values to the function checkflagniveau2(), what I'd do is move the setTimeout into another function in your head.


Code
<head> 
function SetTheTimeOut(one, two, three){
setTimeout("checkflagniveau2(one, two, three)", 500);
}
</head>

onMouseOut='MM_swapImgRestore();SetTheTimeOut("menu2a", "", "hide");'

That's the basic idea I was after,

Tony



BrightNail
Novice

Apr 14, 2001, 9:29 PM

Post #3 of 3 (7404 views)
Re: Not enough quote symbols??? [In reply to] Can't Post

First off, I would not use code generated by an editor.

Yes, setTimeout requires two arguments...the first enclosed by quotes...just use single quotes....just be consistent...If the arguments passed in the function call are in single, use double for setTimeout.....ala

setTimeout('imageswap('image1','image2')",1000)

that should do it.


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives