• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Windows XP Popup blocking

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
She'll be back. I'm just gonna wait here. With this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic