Close a browser window...
How can I close a browser window without getting a standard browser confirm box? This is ****ting me up the wall...
This is the code I am using... the 2nd window opens fine, but the one I am in keeps asking for a second opinion. Goddamn it!!!
window.close();
window.open("login.asp", "LoginWindow", "menubar=no, directories=no, location=no, resizable=no, toolbar=no");
:mad: :mad: :mad:
Re: Don't assume too much...
Quote:
Originally posted by rjlohan
It is perfectly professional. The windows I am trying to close are ones the site doesn't need, however not with window.open().
I need to open a second window to remove the menubar, toolbar, etc. from the display, otherwise later on .asp scripts will get buggered up.
But when I open this second window, there is no need for the index.html which opened it, and I'd rather close it than leave it open. It is basically just a dummy window.
I can't find a way to remove those things from the display within a page, only through the window.open() method.
If you have any suggestions, feel free to share, but don't start lecturing me on the ethics of pop-up windows, or closing browser windows. In this instance it is perfectly legitimate. I can find no other way to disable the 'Back' function in the browser, but I also don't want my dummy windows sitting around.
dummy window that the surfer opened to get to your site. how is that a dummy window?? if it wasn't for that window you would not get any visitors.
the toolbar and address bar have nothing to do with your scripts.
start lecturing you on ethics?? I don't care what you do with your site but if you want visitors to stay at your site I would think of another method of doing what you want. like I said I don't care what you do, but being a webmaster, it is your job to make the surfer happy and stay at your site not piss them off by closing windows that you didn't open. if i wanted to go to another site I would have to open another browser since the one you opened didn't have any toolbars or address bar. that would be enough to piss me off not to go back to your site.
I beleive that yahoo and cnn are professional sites and they don't do such actions. so explain to me how professional it is to close windows you didn't open.
just my opinion so don't get pissed at me.
Once again, you assume too much.
Because this isn't a website for surfers to come browsing through.
It is an online quiz which I am developing for a specific client. To get to this 'site' visitors must be registered. Most of them don't know squat about computers. So I really don't give two hoots about their history or whether they can't see menu bars.
The 'dummy window' is needed because the user must go through this other app (which is a load of **** anyway, but I can't do anything about that) to get to my quiz.
I don't want those things there because
a) I'd like more room for the actual app - the browser menubars/toolbars take up up to 1/4 of the screen.
b) Like I said, going 'back' screws up the app, and they don't need to anyway.
Don't assume that you know everything. You don't.