Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q692 How can I pass the data entered in one form to another form in the same page?

You are here: irt.org | FAQ | JavaScript | Form | 10.2 | Q692 [ previous next ]

Something like:

document.formName2.elementName.value = document.formName1.elementName.value

Perhaps as part of an onClick event handler:

<FORM NAME="formName1">
<INPUT TYPE="TEXT" NAME="elementName">
</FORM>

<FORM NAME="formName2">
<INPUT TYPE="TEXT" NAME="elementName">
<INPUT TYPE="BUTTON" VALUE="Click Me" onClick="document.formName2.elementName.value = document.formName1.elementName.value">
</FORM>

©2018 Martin Webb