javascript firefox
I have a page with one form and 39 drop down select lists.
each Select list has 4 options, like a quiz, where there's a question a user will reply by selecting one of the answers in drop down list. Now first option is always skip this question with value=0 i want to collect everything above "0" into a div called selTop, get value from that list and update selTop innerhtml.
i have this code that works fine with Internet Explorer but it does not work with Firefox, can someone find and alternative for this.
<div id="selTop"></div><input type="button" value="Update" onclick="update()">
<script language="javascript">
function update(){
document.getElementById("selTop").innerHTML="";
var i=1;
for (i=1;i<=35;i++)
{
n=document.myform.elements(i).value
if (n >= "1"){
var d= (document.myform.elements(i).name);
document.getElementById("selTop").innerHTML = document.getElementById("selTop").innerHTML + "<br>" + (d);
}}}
</script>