Connecting Tech Pros Worldwide Help | Site Map

Bad Argument List in setTimeout?

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 1st, 2007, 07:55 PM
M. Fisher
Guest
 
Posts: n/a
Default 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


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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.