This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forcing users to close popups

 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 256
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use a modal dialog box for achieving this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modal dialogs are IE-only.

I achieve this in a cross-browser manner by using a floating div that emulates a dialog.
 
Marc Luzietti
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic