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>

It looks like you have it. What is the problem?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.