problem with quotes

problem with quotes

  
hello

i want to call the setTimeout function on onmouserover event. the problem is that when I call the setTimeout function with other function inside it gives me errors on javascript. the problem must be with quotes inside quotes.

ex:
"setTimeout('popup(1,"'+Site.ServerURL+"cmdb_20/EntryViewEmailPopUp.aspx' )',2000)"

or

setTimeout('popup(1,'http://im.pt/cmdb_20/EntryViewEmailPopUp.aspx' )',2000)


I have already tried with two ' but nothing.

thanks
Have you tried using the function EncodeJavascript?
the problem is where to put the quote and how many quotes...
Hi Diogo,

I believe this is what you are looking for:
"setTimeout('popup(\'" + Site.ServerURL + "cmdb_20/EntryViewEmailPopUp.aspx\')',2000);"

Cheers,
Tiago Simões