By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

How to open a ModalDialog window with in a Modal Dialog Window

P: 1
Actually I have to call a dialog window "Dwin1" from a Parent Window.
From Dwin1, I have to call another Dialog Window "Dwin2".if user close the Dialog Window "Dwin2", i have to refersh the Dwin1. If user close Dwin1, i have to refresh the Parent Window.

For opening a Dwin1 , should not be a problem.but if i open the another dialog Dwin2 from Dwin1, it's opening like a seperate window Dwin1 . From there it's opening the Dialog

Open Dwin1

Expand|Select|Wrap|Line Numbers
  1. string PopUpWindowPage = "Dwin1.aspx?Query=NEW&VehicleId=" + vehicleId ;
  2.  
  3. string Script = "";
  4. Script += "\n<script language=JavaScript id='ParentWindow'>\n";
  5. Script += "var confirmWin = null; \n";
  6. Script += "var winSettings = 'dialogWidth:960px; dialogHeight:700px; left:69; top:20; resizable:no; scroll:no; help:no; toolbar:no; edge:raised; menubar:no; status:no; center:yes; unadorned: yes';";
  7. Script += "window.showModalDialog(' " + PopUpWindowPage + "',self,winSettings); \n";
  8.  
  9.  
  10.         Script += "</script>";
  11.  
  12.  
  13.         //Check wether they are already  registered
  14.         if (!this.IsClientScriptBlockRegistered("ParentWindow"))
  15.         {
  16.             //Register the script
  17.             this.RegisterClientScriptBlock("ParentWindow", Script);
  18.         }
  19.  
open Dwin2 from Dwin1
Expand|Select|Wrap|Line Numbers
  1. string PopUpWindowPage = "Veh.aspx";
  2. string Script = "";
  3.         Script += "\n<script language=JavaScript id='LicenseSelectionPopupWindow'>\n";
  4.      Script += "var winSettings = 'dialogWidth:655px; dialogHeight:435px; left:80; top:40; resizable:no; scroll:no; help:no; toolbar:no; edge:raised; menubar:no; status:no; center:yes; unadorned: yes';";
  5.         Script += "window.showModalDialog(' " + PopUpWindowPage + "',self,winSettings); \n";
  6.  
  7.                 Script += "</script>";
  8.  
  9. if (!this.IsClientScriptBlockRegistered("LicenseSelectionPopupWindow"))
  10.         {
  11.             //Register the script
  12.             this.RegisterClientScriptBlock("LicenseSelectionPopupWindow", Script);
  13.         }
  14.  
Please help me
Oct 30 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
For opening a Dwin1 , should not be a problem.but if i open the another dialog Dwin2 from Dwin1, it's opening like a seperate window Dwin1 . From there it's opening the Dialog
If you want to "open" it within the window, don't use showModalDialog or window.open(). Create a DHTML 'window' instead. You can use one of the lightbox clones/alternatives which display a modal pseudo-'window' within the window.
Oct 30 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.