Solved

Disable parent window when popup is open

Posted on 2009-05-14
8
949 Views
Last Modified: 2012-05-07
Is there a way to disable the parent window when a child (popup) window is open?
0
Comment
Question by:cuttieveenz
8 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24384637
when you popup with DialogModal the underlying window will not be accessible.
0
 
LVL 19

Expert Comment

by:erikTsomik
ID: 24384692
0
 
LVL 39

Expert Comment

by:abel
ID: 24384765
This technique, however, only works on IE:

<body>
    <p>click on the button</p>
    <input type="button" onclick='window.showModalDialog("http://www.google.com");' value="show google modal" />
</body>
</html>

Open in new window

0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 39

Expert Comment

by:abel
ID: 24384777
Yes, the lightbox and the greybox are excellent alternatives to this....
0
 
LVL 39

Expert Comment

by:abel
ID: 24386468
I created a little example and find out along the way that showModalDialog works on both browsers (IE, FF) but its semantics is lightly different on FF then on IE. The example also shows GreyBox, but I didn't manage to get LightBox working timely. http://www.undermyskin.org/external-examples/ee-questions/Q_24408354/ (use View Source to see the source of how I did it, which is basically the same as I showed above).
0
 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35099253
Hi,

I have created a jQuery function: showModalDialog which works on all major browsers: IE, Chrome, Safari and Firefox.

You can see the entire article on my blog: http://extremedev.blogspot.com/2011/03/windowshowmodaldialog-cross-browser-new.html
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 37194229
Question PAQ'd and stored in the solution database.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question