An example of how to call a subwindow in the ifame parent window in Chrome

Source: Internet
Author: User

A browser incompatibility problem encountered in the project:

In IE and Firefox, calling the js function of the Child Window using the name of the child window in the parent window of the ifame framework page is good, and it is difficult to make it in Chrome.
Copy codeThe Code is as follows:
<Frameset rows = "108, *, 30" border = "0" frameSpacing = "0" frameBorder = "0">
<Frame name = "header" scrolling = "no" noresize src = "base/header"/>
<Frame id = "memuMain" name = "main" scrolling = "no" noresize src = "$ {ctx}/index. jsp"/>
<Frame name = "footer" scrolling = "no" noresize src = "base/footer"/>
<Noframes>
<Body>
<P> This webpage uses a framework, but your browser does not support the framework. </P>
</Body>
</Noframes>
</Frameset>

In IE and Firefox, you can write as follows:
Copy codeThe Code is as follows:
Function changeMenu (menu_id ){
Header. window. changeMenu (menu_id );
}

Or:
Copy codeThe Code is as follows:
Function changeMenu (menu_id ){
Frames [0]. changeMenu (menu_id );
}

Yes,

In Chrome, only the second method can be used. Therefore, the second method should be used to consider compatibility issues with multiple browsers.

Related Article

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.