Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CLose the window when you click a button

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Me Again

Can somebody tell me how you can close the open browser window when you click a button?

Ta very much

Nev G
 
with javascript:

on (press){
getURL('javascript:top.close()')
}

or something like that.. Victor
 
That'll work!
But the user will get a warning and a choice not to close it!
mywink.gif
ldnewbie
Hope that this
was helpful!
 
As far as I know the only way a script such as javascript:window.close() will close a browser window without asking the user if he really wants to do that is if it is a popup window. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Jeff,
I don't think it's really a question of the window being a popup or not... It's more a question of that call being made in and about to close your main browser window!

...If that makes any sense to you!
mywink.gif
ldnewbie
Hope that this
was helpful!
 
well, there IS a workaround in IE :) but i don't think it would match Nev's demands.. Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top