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


Apr 11, 2001, 12:06 PM

Views: 15410
Not enough quote symbols???

Well, let's inaugurate this forum!
I'm using the following code in an anchor tag :

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!


Apr 11, 2001, 2:17 PM

Views: 15407
Re: Not enough quote symbols???

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.

function SetTheTimeOut(one, two, three){
setTimeout("checkflagniveau2(one, two, three)", 500);

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

That's the basic idea I was after,



Apr 14, 2001, 9:29 PM

Views: 15397
Re: Not enough quote symbols???

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


that should do it.