views:

1378

answers:

7

I need to open a popup Window to a cross domain content. I should not allow the user either to access or close the parent window, till i am done with Child window.

The main issue with Modal window is that stops any asynchrnous process running on the main window. For example, timers and auto refresh wont be working in the parent window.

Is there any perfect way to do the above said.

Thanks in advance

+2  A: 

How about instead of popping up an actual window, you just open a pseudo-window...that is a div with some borders, make it draggable if you want, and place a large semi-transparent div that covers the rest of the page and blocks it from being clicked on. Basically do something like how Lightbox works

davr
A: 

I think Telerik has a control for this if you are working on ASP.Net. Uses a div in its implementation as @Davr suggested. Modal windows are a bad option anyhow as they are not supported on all browsers.

JasonS
+1  A: 

You could use a fake window built via javascript. Several widget libraries have support for this. For example, see ExtJS, which also supports modal windows but it might be overkill for your application. For jQuerry, browse through the plugins, like this one

tsg
A: 

In addition to what Davr and thoriann said, you will likely need to make an Ajax call to grab the content. Since Ajax calls via the browser enforce the same-domain policy, you will need to make an Ajax call to your OWN server, which in-turn will need to make an xmlhttp sever-to-server request to grab the content the third-party server.

Diodeus
A: 

I feel the above answers wont fit for the following reasons..

JasonS Solution - The application is developed on J2EE technologies.

Other's solution - Some of the the URL Launched in the child window will communicate to the parent window through standard APIs. If i am using div or other in-built plug-in windows, then those javascript API will fail.

A: 

Check this link:

http://javascript.about.com/library/blmodal.htm

prinzdezibel
A: 

Check out the Jquery plug in "BlockUI". When BlockUI is called the parent window is not accessable. You can do what you want on the modal then call "UnblockUI" to close the popup and give parent control again.

Pete