|
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>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.