469,345 Members | 6,170 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,345 developers. It's quick & easy.

Bad Argument List in setTimeout?

I have a line in my html file as following:

<div id="selectBox" class="selectbox" onclick="$
('PostMark_Pa4440a_SelectCol_1').toggle();" onmouseout="setTimeout('$
('PostMark_Pa4440a_SelectCol_1').hide();', 10000);">Select...</div>

But because I have to use those single quotes as you see, I get the
following error.

Error: missing ) after argument list
Source Code:
setTimeout('$('PostMark_Pa4440a_SelectCol_1').hide ();', 10000);

I am not aware or any way around this, is there one? I am prototype.js
so that is why the syntax is being used?

Thanks

Mar 1 '07 #1
2 1836
VK
On Mar 1, 11:45 pm, "M. Fisher" <mcfishe...@gmail.comwrote:
<div id="selectBox" class="selectbox" onclick="$
('PostMark_Pa4440a_SelectCol_1').toggle();" onmouseout="setTimeout('$
('PostMark_Pa4440a_SelectCol_1').hide();', 10000);">Select...</div>
Did you try to escape inner quotes?

\'PostMark_Pa4440a_SelectCol_1\'

Mar 1 '07 #2
On Mar 1, 1:59 pm, "VK" <schools_r...@yahoo.comwrote:
On Mar 1, 11:45 pm, "M. Fisher" <mcfishe...@gmail.comwrote:
<div id="selectBox" class="selectbox" onclick="$
('PostMark_Pa4440a_SelectCol_1').toggle();" onmouseout="setTimeout('$
('PostMark_Pa4440a_SelectCol_1').hide();', 10000);">Select...</div>

Did you try to escape inner quotes?

\'PostMark_Pa4440a_SelectCol_1\'
Excellent, that works, I did not realize it would accept that. Thanks
a bunch.

Mar 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Raphael Bauduin | last post: by
69 posts views Thread by markarichman | last post: by
12 posts views Thread by Andrew Poulos | last post: by
28 posts views Thread by Andre | last post: by
4 posts views Thread by E | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.