) Window. opener. Location. Reload () and href

Source: Internet
Author: User

The two methods are used to refresh the parent window, but there are still some mysteries.

Window. opener. location. reload (); when this method forces the parent window, a confirmation dialog box is displayed in some ie browsers (such as high security settings, it prompts if you want to refresh the page again. This is a depressing thing. I later replaced this method with window. opener. location. href = Window. opener. location. href;
This will not happen.

 

Window. opener actually refers to the parent window of the current window, for example, one. JSP opens two through popupwindow. JSP, where is two. window in JSP. opener refers to one. JSP, so in two. windows can be used in JSP. opener calls any one. the methods in JSP implement one. JSP and two. JSP interaction.

 

Note: window. opener. location. href is just a link. To submit a parent window, you must call window. opener. action = "" and window. opener. submit (); method, but unfortunately this sectionCodeCannot run in Firefox. The solution is to write a submitted function in the parent window and call it through window. opener. functionname () in the subwindow.

 

Window. when using opener, you must determine the status of the parent window. If the parent window is closed or updated, an error will occur. The solution is to add the following verification if (window. opener &&! Window. opener. Closed)

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.