Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Iframe + forms

Status
Not open for further replies.

Bramvg

IS-IT--Management
Jan 16, 2001
135
BE
Hi,

I have a page, called '1.htm which contains 5 hidden fields with a certain value.
On the same page I have an Iframe, which also contains hidden fields, about 15.

Now, I'm trying to get all the values (20) onto the next page, 2.cfm

Does anyone know how to do this?.

tnx
regards
bram
 
What you could do is create a javascript function that would take the values of the page2.htm and set the value in a hidden field in the 1.htm page.

e.g
Page 1:
<script language=&quot;JavaScript&quot;>
function setForm2() {
frm2.Page2Text1.value = iframe2.frm2.Page2Text1.value;
// add other fields here
}

</script>
<form name=&quot;frm2&quot; method=&quot;post&quot; action=&quot;test3.cfm&quot; onsubmit=&quot;javascript:setForm2()&quot;>
<input type=&quot;Hidden&quot; name=&quot;Page2Text1&quot; value=&quot;&quot;>

<input type=&quot;text&quot; name=&quot;Page1Text1&quot; onclick=&quot;javascript:setForm2()&quot; value=&quot;&quot;>
<input type=&quot;Submit&quot;>


<iframe src=&quot;test2.cfm&quot; name=&quot;iframe2&quot;></iframe>
</form>

Test 2.cfm:
<form name=&quot;frm2&quot;>
Page 2 Text 1<input type=&quot;Text&quot; name=&quot;Page2Text1&quot; value=&quot;&quot;>
</form>

Test3.cfm:
<cfoutput>#form.Page2Text1# --
#form.Page1Text1#
</cfoutput>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top