Connecting Tech Pros Worldwide Help | Site Map

Bad Argument List in setTimeout?

  #1  
Old March 1st, 2007, 08:55 PM
M. Fisher
Guest
 
Posts: n/a
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

  #2  
Old March 1st, 2007, 09:15 PM
VK
Guest
 
Posts: n/a

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\'

  #3  
Old March 1st, 2007, 09:45 PM
M. Fisher
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with XmlHttpRequest (0x80040111 / nsIXMLHttpRequest.status) on several configurations Greg answers 42 May 5th, 2006 12:45 PM