0

Hi have to pass the values in the first five text box's to the second five text box's,nearly have it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script>

function transfer()
{
var myArray = [];
var txtBoxs1 = 5;
var i=0;


for (i=0;i<txtBoxs1;i++)
		{		
		myArray[i] =(document.getElementById('num' + (i+1)).  		value);
		
		document.Form2.value('num5'+(i)) 
		= myArray[i]		
		}

//alert(myArray);
}



</script>
<form name="Form2">

<label>No1.</label>
<input type=text id="num1" maxlength="25"/>
<br/>
<br/>
<label>No2.</label>
<input type=text id="num2" maxlength="25"/>
<br/>
<br/>
<label>No3.</label>
<input type=text id="num3" maxlength="25"/>
<br/>
<br/>
<label>No4.</label>
<input type=text id="num4" maxlength="25"/>
<br/>
<br/>
<label>No5.</label>
<input type=text id="num5" maxlength="25"/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<label>No6.</label>
<input type=text id="num6" maxlength="25"/>
<br/>
<br/>
<label>No7.</label>
<input type=text id="num7" maxlength="25"/>
<br/>
<br/>
<label>No8.</label>
<input type=text id="num8" maxlength="25"/>
<br/>
<br/>
<label>No9.</label>
<input type=text id="num9" maxlength="25"/>
<br/>
<br/>
<label>No10.</label>
<input type=text id="num10" maxlength="25"/>
<input type=button value="Transfer" onclick="transfer()"/>

<br/>
<br/>
</form>





</body>
</html>
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by MartinRinehart
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.