This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to stop opening a new Window in IE(Urgent !!!) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to stop opening a new Window in IE(Urgent !!!)" Watch "How to stop opening a new Window in IE(Urgent !!!)" New topic
Author

How to stop opening a new Window in IE(Urgent !!!)

Dushyant Bhardwaj
Greenhorn

Joined: Apr 18, 2004
Posts: 28
Dear All,
How can I stop opening a new window in IE because
my session gets transferred when I open a new window.
1. I want to restrict
File -> New -> Window
2. I am already handling CTRL+N using JavaScript sucessfuly.
Is there any way by which handle 1 using JavaScipt or other way.
Thanks in advance.

Regards
Dushyant Bhardwaj
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There is no way to get around that
Dushyant Bhardwaj
Greenhorn

Joined: Apr 18, 2004
Posts: 28
Eric,
Thanks for your reply.
Regards,
Dushyant Bhardwaj
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
What you could do, is try to close the window user just opened (user will get 'Do you want to close dialog'), or redirect user to a different page, saying "You can't do that";
This code works in IE.
Downside - when your page loads, new window will be opened and closed, Popup removers may cause code to not work and I don't think another IE will be able to see the same page at the same time, even if it opened not through
Window-New.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to stop opening a new Window in IE(Urgent !!!)
 
Similar Threads
Problem with session
Prevent new Window in JSP
Session
IE 6 hide menubar, toolbar in current window
location replace works in firefox and not in IE