I am having below html code and trying to add new values to global array by onchanging of javascript function.I am trying to do like below way.But it is giving javascript errors.Please suggest anyone how to do this.
<html>
<head>
<script>
var list=[];
function getList(value){
list=list(value);
}
</script>
</head>
<body>
<tr>
<td>
<select name="test" onchange="getList(this)">
<option id="1" value="one">One</option>
<option id="2" value="two">two</option>
</select>
</td>
</tr>
<tr>
<td>
<select name="test1" onchange="getList(this)">
<option id="3" value="three">three</option>
<option id="4" value="four">four</option>
</select>
</td>
</tr>
</body>
</html>
listdefined somewhere (I guess not)? I suggest you read a JavaScript tutorial first: developer.mozilla.org/en/JavaScript/Guide