Click here to Skip to main content
15,902,886 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am having two windows. One is showmodaldialog and other is window.open.

I want to raise both the windows at a time.

Wnen i give window.open for the two windows it gets open simultaniously. But it won't when we use showmodaldialog and window.open.

But my requirement is to open one window with showmodaldialog and other with window.open.

Can any one help us

[PK: Tag updated]
Posted
Updated 9-Nov-10 1:40am
v2

What is the problem you are getting when you are opening both the windows simultaneously?

If you write like following, both the window will open simultaneously.

function Load() {
            window.open("http://www.google.com");
            window.showModalDialog('http://www.google.com');
        }



But if you will write like following, your popup will not open until you close the modal dialog, your window.open line will only execute once the modal dialog is closed. This the the default behavior of window.showModalDialog.

function Load() {
          window.showModalDialog('http://www.google.com');
          window.open("http://www.google.com");
      }



Follow the first approach and you will be able to open them simultaneously.
 
Share this answer
 
v2
A "modal dialog" is intended to prompt the user to react to that window before continuing with the rest of the application. If you use File -> Open... in any program, the program waits for the open dialog to finish before moving on. If this would not wait, the application would first need to check again if any current changes need to be saved. Also, you could go into the menu and choose "open..." again.

The solution is to show the dialog, but simply not as model using showModelessDialog.

http://msdn.microsoft.com/en-us/library/ms536761%28v=VS.85%29.aspx[^]

Good luck!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900