Link to home
Start Free TrialLog in
Avatar of sjsharp80
sjsharp80

asked on

Using Javascirpt to display an alert and on closig the alert the browser window will also be closed

Hi,

I'm looking for Javascirpt to display an alert on clicking a submit button and on closing the alert window the browser window will also be closed, is this possible or something close??

thx
Avatar of Zyloch
Zyloch
Flag of United States of America image

Hi

You would use a window disguised as best as possible to an alert. I'm not sure if IE supports it now, but you can have window.open(URL,name,'width=200,height=200,dependent=yes');

Another option would be to make an in-page <div> that looks like an alert and to disable losing focus from it until the X is closed or something.

Regards,
Zyloch
ASKER CERTIFIED SOLUTION
Avatar of RozanaZ
RozanaZ

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of justinbillig
justinbillig

the only problem is if the window is the main window open the browser will prompt the user to close .. they can always just say no