variables & arrays before I move on to a more complicated project. I
created this simple example to experiment and as far as I can tell, it
should work but it doesn't. Can someone tell me where I went wrong?
<html><head>
<title>Form Test</title>
<script language="JavaS cript>
<!--
function copy(){
var firstField = new Array();
var secondField = new Array();
for(j=0; j<=4; j++){
firstField[j] = document.myForm .numText;
}
for(i=0; i<=4; i++){
secondField[i] = document.myForm .copyText;
}
firstField[0].value = "mark";
firstField[1].value = "hannon";
firstField[2].value = "anne";
firstField[3].value = "mulligan";
for(k=0; k<=4; k++){
secondField[k].value = firstField[k].value;
document.myForm .iValue.value = k;
}
}
// -->
</script>
</head>
<body bgcolor="#FFFFF F">
<form id="myForm" name="myForm" action="" method="POST"
enctype="text/plain">
<input name="numText" type="text" value="" size="15" maxlength="15"> <br>
<input name="copyText" type="text" value="" size="15" maxlength="15"
<br>
<input name="iValue" type="text" value="" size="2" maxlength="2" ><br>
value of i: <input name="copyBut" type="button" value="Copy"
onClick="copy() ">
</form>
</body>
</html>