Usage Summary of showmodaldialog in the mode window

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.