Access the txtaddress control of the iframe subform on the parent page.
Window. Frames ["ifrmapcompanydetails" 2.16.doc ument. All ("txtaddress"). value = 'address ';
Access the textbox1 control of the parent page in IFRAME subform 1, and subform 1 assigns the value to a control of subform 2.
String strvalue = "value passed from the child form to the parent page ";
The following is called in the page_load event. Of course, it can be written in a Javascript script.
this.Response.Write("<script>parent.document.all('TextBox1').value = '" + strValue + "';</script>"); this.Response.Write("<script>if( parent.document.all('TextBox2').value = '0')parent.document.all('TextBox1').value = '44';</script>");
The sub-form accesses the global variables in the parent form:
Parent. xxx;
Access the txtaddress control of child Form 2 in IFRAME subform 1 and assign the value to a control of child Form 2.
Window. Parent. Frames ["ifrmapcompanydetails" 2.16.doc ument. All ("txtaddress"). value = 'address ';
The parent form submits two IFRAME child forms.
Window. Frames ["ifrmapcompanydetails"]. form1.submit ();
Window. Frames ["ifrmapproductinfodetails"]. form1.submit ();
The IFRAME subform calls the Javascript event of the parent page.
Window. Parent. XXX ()
// The parent page calls the script childevent on the IFRAME subpage of the current page.
Function invokechildevent ()
{Var FRM = Document. Frames ["ifrchild1"]. childevent ();}
Or call the childevent script in the first IFRAME on the current page.
{Var FRM = Document. Frames [0]; frm. childevent ();}
// The button event that calls a button of the parent form on the Child page
Window. Parent. form1.btnparent. Click ()
A button event that calls a button of a child form on the parent page
Response response frames['ifrchild1'hangzhou.doc ument. All. Item ("btnchild3"). Click ();
// Jquery part:
1. In the parent window, select all radio buttons in IFRAME.
$(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");
2. in IFRAME, select all radio buttons in the parent window
Vertex (w.w.parent.doc ument). Find ("input [@ type = 'Radio ']"). ATTR ("checked", "true ");