Appcan Study Notes (1)--method of calling a child page on the parent page

Source: Internet
Author: User

1. Single sub-page

Index.html is the parent page with Div: <div id= "Content" class= "Ub-f1" > </div>

This DIV hosts the sub-page index_content.html

When an event in the parent page is triggered, a method in the child page is called, and the code is as follows

Appcan.frame.evaluateScript ("", "Content", "RequestData ('" +par+ ")");

Where RequestData is the method name in the sub-page, Par is the method parameter.

2. Multiple sub-pages

Index.html is the parent page with Div: <div id= "Content" class= "Ub-f1" > </div>

This DIV hosts the sub-page index_content1.html,index_content2.html,index_content3.html, the typical scenario for the Tabview control, the following code

Appcan.frame.open ({

ID: "Content",

URL: [{

"Inpagename": "Content1",//Window 1 name

"Inurl": "index_content1.html",//Window 1 path

}, {

"Inpagename": "Content2",//Window 2 name

"Inurl": "Index_content2.html"

}, {

"Inpagename": "Content3",//Window 3 name

"Inurl": "index_content3.html",//Window 3 path

}],

When an event in the parent page is triggered, a method in the child page is called, and the code is as follows

Uexwindow.evaluatemultipopoverscript ("", "Content", "Content1", "RequestData ('" +par+ ")");

Where RequestData is the method name in the sub-page, Par is the method parameter, the third parameter is the window name of the child page, the first parameter is the name of the parent page, if the parent page is the root window, that is, the homepage, can be empty.

Appcan Study Notes (1)--method of calling a child page on the parent page

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.