GaryZ
asked on
Passing data to IFRAME
I have the following code on a form to open an IFRAME
<IFRAME id=iframe_class name=iframe_class src="f2.html" scrolling = "auto" style="width:80%;height:35 0;position :bottom;le ft:10;z-in dex:5;disp lay:none"> </iframe>
I can pass the data from the IFRAME back to the form, but I can't get data from the form to pass to the IFRAME.
<IFRAME id=iframe_class name=iframe_class src="f2.html" scrolling = "auto" style="width:80%;height:35
I can pass the data from the IFRAME back to the form, but I can't get data from the form to pass to the IFRAME.
ASKER
What additional information do you need?
f1.html is the main form and has a field called f1_risk
f2.html is the Iframe and has a field called f2_risk
When a user clicks on a button I do the following:
document.getElementById('i frame_clas s').style. display='i nline';
I also want to populate f2_risk with the value in f1_risk
f1.html is the main form and has a field called f1_risk
f2.html is the Iframe and has a field called f2_risk
When a user clicks on a button I do the following:
document.getElementById('i
I also want to populate f2_risk with the value in f1_risk
iframe_class.document.form name.f2_ri sk.value = document.formname.f1_risk. value;
change the 'formname'(s) to whatever the forms names are.
else if each form is the first within the respective pages:
iframe_class.document.form s[0].f2_ri sk.value = document.forms[0].f1_risk. value;
Vinny
change the 'formname'(s) to whatever the forms names are.
else if each form is the first within the respective pages:
iframe_class.document.form
Vinny
ASKER
I tried the following but I get a syntax error on the IF. Since the IFRAME is hidden on the load of the form, I need to check to see if the field is available.
if(iframe_class.document._ V2_F2.F2_R isk_1)
{
iframe_class.document._V2_ F2.F2_Risk _1.value = document._F1.F2_RiskType1. value;
}
if(iframe_class.document._
{
iframe_class.document._V2_
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK. Got it, thanks a lot. It appears it was cached in IE 6.
iframe_class.document.form
frames['iframe_class'].doc
iframe_class.globalVarname
more info would help
Vinny