aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes forcing users to close popups 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 "forcing users to close popups" Watch "forcing users to close popups" New topic
Author

forcing users to close popups

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137
Hi,
I would like users to close the popup window before entering data in the parent window.
How do you force users to do this?
Is there a parameter in the window.open call?

Thanks in advance
Anil
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
use a modal dialog box for achieving this.


Life called,so here I am.<br />Cheers<br />Niki.:-)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Modal dialogs are IE-only.

I achieve this in a cross-browser manner by using a floating div that emulates a dialog.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Marc Luzietti
Ranch Hand

Joined: Feb 02, 2006
Posts: 84
Most modal scripts rely on checking the browser every second to make sure the window is on top. Not a particularly friendly thing to do. You could write a script so that onBlur the window is refocused, but there are ways around that too.

The IE modal property, in addition to being IE only, has problems passing data back to the originating window.

The best method is to either use a hidden div that becomes visible or to use an AJAX call.
[ March 01, 2006: Message edited by: Marc Luzietti ]

Support Kathy Sierra
 
 
subject: forcing users to close popups