简体   繁体   中英

pop-up div over parent window

How can i populate a div over parent window and parent window must be disable unless until pop-up Div/ html page closes.

Parent Window disable means not able to work on. Once the child div populated over parent div then you are only allowed to continue on this populated div/ html page.

1) Have a div that takes over all your monitor. Display by default to none, and z-index 1 (it also needs position absolute)

2) Have the popup div again position absolute, and display to none. z-index 2

3) Onclick change the display for those two. As long as div 1 is visible and it takes over all the monitor, you won't be able to do anything. Only div 2 will be accessible as it is over div 1 in z direction.

Like the jQuery UI modal dialog ? If you use the jQuery UI library, all it takes is a simple function:

$('#foo').dialog()

Impossible to do reliably, users can circumvent it. You can simulate a modal dialog, but on the client anything goes. Whatever this dialog is supposed to prevent, your server and in-page logic must expect that it may not have done the job.

worth reading this link

you can easily make it by following this example

http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM