aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Windows XP Popup blocking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Windows XP Popup blocking" Watch "Windows XP Popup blocking" New topic
Author

Windows XP Popup blocking

Priyaa V Kumar
Ranch Hand

Joined: Aug 12, 2004
Posts: 32
Hi,

I have a situation where I click on a href in my first jsp, say Test1.jsp and am redirected to Test2.jsp, which in turn opens a new window using window.open from a javascript. This works fine when there is no popup blocker. Unfortunately, IE on Windows XP has popup blocker with medium severity and it blocks the new window. Here's how my code is:

Test1.jsp



NOTE: My original page has a menu item on clicking which, I will be redirected to Test2.jsp.

Test2.jsp



If you look at my code, I am calling the javascript function to open the window inside the <head> tag. I tried to put it in body onload too, but it didnot help either.

The reason I couldn't open the new window from Test1.jsp itself is, I want user to complete some test in the new window and then come back to a page that asks him to click on something to get the score. [I haven't put that refresh button code in test2.jsp, but just the skeletal code]

How do I go about opening the new window so that it is not treated as a popup?

Any help is appreciated.

Thanks
Padma

[ January 09, 2006: Message edited by: Priyaa V Kumar ]

[ January 09, 2006: Message edited by: Priyaa V Kumar ]
[ January 09, 2006: Message edited by: Bear Bibeault ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Doesn't you whole purpose behind this question defeat what a pop up blocker is meant to do?

The solution is to tall the people to enable pop ups on the site or have them open it up from a link with the action of onclick.

Eric
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
I would put a check there - if window did not open display a div in the middle of the page with a message about popup blocker and a link to hide this div and open a window.
[ January 09, 2006: Message edited by: Yuriy Fuksenko ]
Priyaa V Kumar
Ranch Hand

Joined: Aug 12, 2004
Posts: 32
Thanks for your replies, guys. I was able to overcome the problem by this approach.

In click event of test1.jsp open the new window with test2.jsp as target.
Then, in test2.jsp do the logic and then do a JSP redirect (or a javacript window.location.href) to the actual page you want to show on the new window.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Windows XP Popup blocking