Javascript Subs
this is my code:
ResultWin.document.write("<html><head></head><body style='margin:0px;' onload='setTimeout(???this.close???,4000)>');
It is a part of a function that opens a window (ResultWin) and after 4 seconds it should close it.
The protocol of the setTimeout demands its action (this.close) to be quoted. But what do I put there at position of the question marks?
In other words: how to get a third level substring?
Thanks a lot
Shakespeare: onclick || !(onclick)
Jack Michaelson posted this at 15:18 — 10th September 2003.
He has: 1,733 posts
Joined: Dec 1999
Found it:
escape character is the backslash
ShaneS posted this at 20:29 — 10th September 2003.
They have: 93 posts
Joined: Jun 2003
if you would have done Onload="" versus Onload='' you would not of had that problem.
NM, forgot it was in a JS string already. yes in that case you must use \' \'
[Design Alpha] -Web Services : Design,Hosting,Advertising,Software
Ask about custom pricing on hosting!!
Site Assets: [UltraGaming.com] [Blades of Warcraft]
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.