You are here: irt.org | FAQ | JavaScript | Form | 10.2 | Q462 [ previous next ]
In the first form add an onChange event handler with call a function call which populates the other fields in the other forms. For example:
<SCRIPT LANGUAGE="JavaScript"><!-- function changeAll(what) { for (var i=1; i<10; i++) document.forms[i].elements[what.name].value = what.value; } //--></SCRIPT> <FORM> <INPUT TYPE="TEXT" NAME="field1" onChange="changeAll(this)"> </FORM <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM> <FORM> <INPUT TYPE="TEXT" NAME="field1"> </FORM>