473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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

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
1 4466
acoder
16,027 Expert Mod 8TB
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

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

Similar topics

3
by: Gretjns | last post by:
I'm trying to figure out this script doesn't display any text in the child window and why I'm getting the null or not an object error. It's taken directly from the Javascript and DHTML cookbook...
6
by: Jure Erznoznik | last post by:
I just spent the whole day on solving this problem but still have no success. This is what i do: ModalDialog.window = window.open("", "error", "toolbar=no,width=" + iWidth + ",height=" +...
5
by: MrNobody | last post by:
I am using the no-arg ShowDialog() method hoping that the window would not be modal to any other window like the other ShowDialog(IWin32Window) method does, but when this opens it somehow becomes...
4
by: Bsiang Tan | last post by:
Dear all expert, I use javascript to open a modal dialog window window.showModalDialog('child.aspx'); but in my child.aspx, got a button, when I click the button, it will do the postback,...
3
by: Lisa | last post by:
If anyone knows how I could go about doing the following, I would greatly appreciate some info. I have an aspx page that has some fields for user input as well as a button. When the button is...
3
by: harikrishnan.kamalakannan | last post by:
Hi, When a open an asp page from a modal window through window.open, my session values of parent(the screen that invoked the modal window) are lost. Please this is urgent.
6
by: praan | last post by:
I am trying to display xml content in a modaldialog window using window.showModalDialog(), but a blank modaldialog window is displayed. can anyone help me with this. Any other way present to...
4
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.