Connecting Tech Pros Worldwide Forums | Help | Site Map

Bad Argument List in setTimeout?

M. Fisher
Guest
 
Posts: n/a
#1: Mar 1 '07
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


VK
Guest
 
Posts: n/a
#2: Mar 1 '07

re: Bad Argument List in setTimeout?


On Mar 1, 11:45 pm, "M. Fisher" <mcfishe...@gmail.comwrote:
Quote:
<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\'

M. Fisher
Guest
 
Posts: n/a
#3: Mar 1 '07

re: Bad Argument List in setTimeout?


On Mar 1, 1:59 pm, "VK" <schools_r...@yahoo.comwrote:
Quote:
On Mar 1, 11:45 pm, "M. Fisher" <mcfishe...@gmail.comwrote:
>
Quote:
<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.

Closed Thread