Usage Summary of showmodaldialog in the mode window
We have been dealing with the problem in the mode window over the past few days. Simply write this summary for your reference:
1. Open the window:
VaR handle = Window. showmodaldialog (URL, objects, feathers );
Here, objects can be a parameter (including an array) or an object.
In general, objects = {window} shares the object of the parent form to the child form.
2. Close the subwindow:
Window. Close ();
3. PASS Parameters from the child form to the parent form:
Window. returnval = string;
3. Clear the cache to prevent the mode window from being updated:
Html
ASP
<%
Response. expires =-1
Response. expiresabsolute = now ()-1
Response. cachecontrol = "no-Cache"
%>
PHP
Header ("expires: Mon, 26 Jul 1997 05:00:00 GMT ");
Header ("cache-control: No-cache, must-revalidate ");
Header ("Pragma: No-Cache ");
JSP
Response. setheader ("Pragma", "No-Cache ");
Response. setheader ("cache-control", "No-Cache ");
Response. setdateheader ("expires", 0 );
4. Prevent opening a new window (such as submitting a form ):
5. Use F5 in the mode window to refresh the page:
Reload...
Filename indicates the window page.
6. Prevent loss of cookies on pages opened in the mode window:
When the mode window opens a new window, you can only use showmodaldialog (URL, window, feathers); method, and objects is window.
7. In the pop-up window, obtain or set any values for the main window:
Use showmodaldialog (URL, window, feathers) to open the pop-up window)
In the pop-up window, use the window. dialogarguments object (the window object set passed in the main window) to obtain or set the value of the main window.