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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing data between forms on the same page

Status
Not open for further replies.

jwalz

Programmer
Oct 31, 2000
78
US
I need help. I have 2 forms on a single .ASP page. In one form, I have data entered. I need to be able to access the information entered in the data entry fields in a second form that is on the same page. How can I access this information?

Thanks!
Janet
 
jwalz,

Try this..

<html>
<head>
<title>Text Boxes</title>
<script language=&quot;javascript&quot;><!--
function wrt() {
document.frm.b.value = document.frm.a.value
document.frm1.b.value = document.frm.a.value
}
//-->
</script>

</head>
<body>
<form name=&quot;frm&quot;>
<input type=&quot;text&quot; name=&quot;a&quot; onKeyUp=&quot;wrt()&quot;><br>
<input type=&quot;text&quot; name=&quot;b&quot;>
</form>

<form name=&quot;frm1&quot;>
<input type=&quot;text&quot; name=&quot;b&quot;>
</form>
</body>
</html>

fengshui_1998
 
Thanks. That makes sense to me. However, I want to pass the data &quot;copied&quot; to FRM1 through hidden tags when I then do a post on the second form (FRM1) to a second .ASP page. The hidden tags are what's not going through. In other words, I can see and assign the values in my form in my script, but the hidden tag value assignments appear as though they are not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top