Drop-down virker i FF men ikke IE
Nedenstående drop-down virker smukt i FF, men virker ikke i IE. Nogen der kan gennemskue, hvad jeg skal gøre for at få den til at virke i begge?<script language="JavaScript">
function surfto(form)
{
var myindex=form.dropdown.selectedIndex
if (form.dropdown.options[myindex].value != "0")
{
window.open(form.dropdown.options[myindex].value, target="_top");
}
}
</script>
Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "Select * From RESULTS ORDER BY SeasonNumber DESC, TournamentNumber DESC"
rs.Open SQL, Conn, 1
strTournaments = strTournaments & "<form id=form1 name=form1>"
strTournaments = strTournaments & "<select SELECTED='SELECTED' value='' name='dropdown' size='1' onChange='surfto(this.form)'>"
Do While Not rs.EOF
if not rs("SeasonNumber") = strSeasonTotal then
strSeasonTotal = rs("SeasonNumber")
if rs("SeasonNumber") = varSeason then
strTournaments = strTournaments & "<option SELECTED='SELECTED' value='results.asp?sea=" & rs("SeasonNumber") & "&tou=" & rs("TournamentNumber") & "'>Sæson " & rs("SeasonNumber") & "</option>"
else
strTournaments = strTournaments & "<option value='results.asp?sea=" & rs("SeasonNumber") & "&tou=" & rs("TournamentNumber") & "'>Sæson " & rs("SeasonNumber") & "</option>"
end if
end if
rs.MoveNext
Loop
strTournaments = strTournaments & "</select>"
rs.Close
set rs=Nothing
strTournaments = strTournaments & "</form>"