1

Hello, Thank you for your time.

I know it is possible to create an exit button using javascript but this only work in ie browsers and not what i want(i found a fix for it but isnt very good), can somebody please show me a better way of closing all types of browsers(Chrome, Mozilla, Internet Explorer).

Thanks

4
Contributors
7
Replies
13
Views
6 Years
Discussion Span
Last Post by qwsa
1

This works in IE, FF, and Chrome...

<input type="button" value="Close Window" onclick="window.close()">
0

This works in IE, FF, and Chrome...

<input type="button" value="Close Window" onclick="window.close()">

So this should work.....

<input type="button" style="float:left;width:100px;" value="Exit" onclick="window.close();"/></p>

but does not work for me. How did you make it work and close a chrome browser because no matter how many times i click that button it will not close chrome or Mozilla, but in ie it will close with one click.

i tried this aswell window.opener = self;

Edited by brynFlew: n/a

1

Meh, well it only works apparently when that window was opened by another window. It won't work if the window was opened any other way I guess.

0

so its not possible to close chrome and firefox with the click of a button? i dont want to use the top right exit button i want to hide the tool bar for an app and have a exit button that users can click on a scanner and close the page without seeing the toolbar for web restricted access on the portable device.

0

It doesn't seem to be possible, and frankly it shouldn't be. It doesn't really make sense to take away the users default way of closing the browser.

Regards
Arkinder

0

can somebody try and explain to me why this isn't possible or why its not allowed. whats the difference if i create a button that basically does the same thing as the default close button but i want it somewhere else, this seems restricting for what reasons.

Edited by brynFlew: n/a

0

Hi.
Thank you so much for this code
I'll use of this code for my commercial project.
thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.