Hello, well i’m kind of new to javascript and keep getting wrong sum.
starts like this
<select id=”numbers” onChange=”change()”>
<option value=”1″>1
<option value=”2″>2
<option value=”3″>3
<option value=”4″>4
</select>
so far so good, from here i want the number on the page to change depending on what value is chosen like this
var age=document.getElementById(‘myTable’).rows[1].cells;
age[0].innerHTML=personListt.options[personListt.selectedIndex * 2].value;
now when i try it while 1 is being selected the number is just 1 instead of 2,
further on and when i choose 2 i get the number 3 instead of 4, and from value 3 & 4 the number just stays at 3.
any idea on what to do ?