|
-
Jun 1st, 2002, 07:45 AM
#1
Thread Starter
Addicted Member
window.close() query
Here is what I'm doing,
1. Someone comes to my site, it says click her to lauch site
2. Site launches in a new window (600 x 400), centered on the screen
3. When the user clicked 'launch site' it also contained JavaScript to close that window.
Now the problem is when the window is being closed I get a prompt saying somthing like the web page is trying to close the window, do you want to close the window.
I want to close the window without the prompt comming up, I have seen other sites do it and it works, but when I write the same line I get a prompt ?
Is it due to some setting in my browser or somthing ?
Can some one show me (with JS code) how I can close the window without the prompt appearing.
!!! Thank You In Advance !!!
-
Jun 1st, 2002, 07:55 AM
#2
Frenzied Member
I don't know if there's a way around it, but I think it's a security feature of IE to try to prevent malicious scripts. If you try it in NS or Opera it shouldn't prompt you. If the window has no history (i.e. back and forward disabled), or it was opened using JS, I think you should not get the prompt.
-
Jun 2nd, 2002, 07:16 AM
#3
Fanatic Member
top.window.close();
-Matt
-
Jun 2nd, 2002, 07:57 PM
#4
put it this way. you cannot close any window you didn't open with javascript. sure you can close it but that message will show up. no way around it. I also think it does it in other browsers as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|