Moving ModalPopup Outside the IFrame. Possible? Moving ModalPopup Outside the IFrame. Possible? asp.net asp.net

Moving ModalPopup Outside the IFrame. Possible?


If you're using the iframe simply for scrollable content you might consider a styled div with overflow: auto or scroll, instead.

A set up such as this makes it easier to modify the appearance of the entire page since you're not working with multiple documents that each essentially have their own window space inside the page. You can bypass some of the cross-frame communication and it may be easier to keep the information in sync if you need to do that.

This may not be suitable for all situations and may require ajax (or modifying the dom with javascript) to change the div contents instead of just loading a different document in the iframe. Also, some older mobile browsers such as Android Froyo builds don't handle scrollable divs well.


You answered your own question in your update. The modal dialog needs to live on the parent page and invoked from the iframe. Your only other option is to use a scrolling div instead of an iframe.


It is not possible the way you are asking. Think of it this way: an iframe is a seperate window. You cannot (for the time being) move a div in one webpage into another.