Re: JS Help

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Tue, 6 Jun 2000 03:40:50 +0530
 To:  "Brian V Bonini" <brian(at)livenet.net>,
"HWG Languages" <hwg-languages(at)hwg.org>
 References:  livenet
  todo: View Thread, Original
The problem seems to be the quotes.

You can nest upto one level, after that it's tricky.
For example " ' .......' ", works fine but you are looking at 3 levels of
quotes since settimeout() requires the function it calls to be quoted.

The alternative may be to write a function like

function openWin(){
    openAWindow('contact-pu.html','contact',500,480,1)
}

and

onload="setTimeout('openWin()', 5000)"

Ensure openWin has no params. I know it doesn't lend itself easily to
change, but you have a Hobson's choice :(

Cheers,
Srini





----- Original Message -----
From: Brian V Bonini <brian(at)livenet.net>
To: HWG Languages <hwg-languages(at)hwg.org>
Sent: Tuesday, June 06, 2000 2:05 AM
Subject: JS Help


| Can someone help with this, I can't seem to get the syntax correct....
|
| onload="setTimeout('openAWindow('contact-pu.html','contact',500,480,1)',
| 5000)"
|
| It works fine(Well opens the window at least) if I don't try to pass
| anything to
| "openAWindow"
| IE:
| onload="setTimeout('openAWindow()', 5000)"
|
|

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA