Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

forcing users to close popups

 
Ranch Hand
Posts: 137
  • 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
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use a modal dialog box for achieving this.
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Ranch Hand
Posts: 84
  • 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 ]
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic