Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form 10.2 | Q692 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.