View Full Version : Close webpage
Mike4x4
05-11-2008, 11:30 AM
I have got this webpage, how can i make it so when i click a link the webpage closes, so if i click on <A href="test.htm">Test</a> it would load test.htm then close the browser?
If you don't mind my asking, I'm just curious about why you would want to do this. Seems to me it might be alarming to certain users who may think something crashed in the browser.
djr33
05-11-2008, 08:04 PM
I'd be annoyed if you closed my browser window. Sometimes I'll want to use the back button and go find whatever (like a google search) and look for something else.
However, in the case that it is a window you opened with javascript, you can just use this:
onclick="window.close(); return false;"
But that will probably only work if javascript originally opened the window-- otherwise it'll be restricted.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.