Why OH Why doesn't this work...all I want it to do is add three to the current value of the text box.
I tried using "eval" but that doesn't work either. Trouble is it's parsing them together as if they were strings....
<HTML>
<HEAD>
<SCRIPT LANGUAGE="Javascript">
function doChange()
{
var num = myForm.length; // counts the number of form objects starting from zero. num= 7
for(i=0;i<num-2;i++)
{
myForm.elements.value+=3
}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#0000ff" TEXT="#FFFFFF">
<FORM NAME="myForm" STYLE="margin-left:25px">
myText 1: <INPUT TYPE="text" NAME="myText0" value=http://www.webdeveloper.com/forum/archive/index.php/"0"><P>
myText 2: <INPUT TYPE="text" NAME="myText1" value="1"><P>
myText 3: <INPUT TYPE="text" NAME="myText2" value="2"><P>
myText 4: <INPUT TYPE="text" NAME="myText3" value="3"><P>
myText 5: <INPUT TYPE="text" NAME="myText4" value="4"><P>
myText 6: <INPUT TYPE="text" NAME="myText5" value="5"><P>
<INPUT TYPE="button" VALUE="Start" onClick="doChange()"> <INPUT TYPE="Reset" VALUE="Reset">
</FORM>
</BODY>
</HTML>
I tried using "eval" but that doesn't work either. Trouble is it's parsing them together as if they were strings....
<HTML>
<HEAD>
<SCRIPT LANGUAGE="Javascript">
function doChange()
{
var num = myForm.length; // counts the number of form objects starting from zero. num= 7
for(i=0;i<num-2;i++)
{
myForm.elements.value+=3
}
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#0000ff" TEXT="#FFFFFF">
<FORM NAME="myForm" STYLE="margin-left:25px">
myText 1: <INPUT TYPE="text" NAME="myText0" value=http://www.webdeveloper.com/forum/archive/index.php/"0"><P>
myText 2: <INPUT TYPE="text" NAME="myText1" value="1"><P>
myText 3: <INPUT TYPE="text" NAME="myText2" value="2"><P>
myText 4: <INPUT TYPE="text" NAME="myText3" value="3"><P>
myText 5: <INPUT TYPE="text" NAME="myText4" value="4"><P>
myText 6: <INPUT TYPE="text" NAME="myText5" value="5"><P>
<INPUT TYPE="button" VALUE="Start" onClick="doChange()"> <INPUT TYPE="Reset" VALUE="Reset">
</FORM>
</BODY>
</HTML>