• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

pop up window hides itself when parent is closed

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently develop a program which need to pop out a window when the parent browser window is closed.

I write the function windowUnload in JSP as follow:
function windowUnload(evt) {
var popUnder = window.open("survey.jsp", "win", "width=610,height=550,scrollbars=yes,resizable=yes,status=yes");
popUnder.blur();
window.focus();
}

The result is that I can see the child window is popped out when I close the browser, but soon it hide itself.

Can someone explain what happen and how to make it show itself.

Thanks in advance
[ January 16, 2008: Message edited by: Bear Bibeault ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pop up blockers...

Eric
 
Kevin manoj
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked the browser. Blocker setting has been turned off.

I tried the sample code from http://www.javascript-coder.com/window-popup/javascript-popup-example4.html

It works fine on my computer and window is popped out.
But my survey window still did not show up
 
Ranch Hand
Posts: 249
Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the popup.blur() is the source of your problem
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you have some bad requirements to meet:

First: no one will see this survery since almost everyone in the world is using a pop up blocker. So it is a waste unless you expect that people are going to enable it for your site.

Second: I do not think I have ever filled out something that was popped up.

debug your code. Add an alert message, is it being called. Copy the esample and run it in the same location your code is at. Does that run?

Eric
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!