Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Netscape 6.1 displaying NaN in querystring!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,

I'm trying to make a very simple little quiz cross-browser compatible. It works
everywhere (evenNetscape 4.08) except Netscape 6.1 , which produces the value
NaN in the querystring and on the score page. Does anyone know why?

Check it out:
Thanks so much for any suggestions!
 
<script Language=&quot;JavaScript&quot;>
<!--
function calculateScore(){
var score = 0
for (i = 1; i <= 8; i++){
var n = document.form1[&quot;q&quot;+i].selectedIndex;
score += n;
}
document.form1.total.value = score;
document.location.href = 'score.html?' + score;
}
//-->
</script>

it was checking the index for your button in ns6 and sqrewing up your adding
 
Thank you so much!

Can you tell me why Netscape 6.1 was trying to get the value of the button when that element would have been element[8], and in my loop I specified i < 8? I'm new to this and just trying to understand it all.

Thanks again!
 
i'd guess it just handles for loops differently. no idea why it would go through then check instead of check first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top