carpediem79
Technical User
I have a select box in an ASP page that is empty when using Firefox or Safari. It shows the option values fine in Internet Explorer. The form code looks like this:
<form method="POST" name="frmCategory" action="service.asp">
<table width="320">
<tr>
<td width="6"> </td>
<td align="center" width="147">
<select size="10" name="cboCategory"></select></td>
<td width="6">  </td>
<td width="6">  </td>
<td align="center" width="61">
<input type=submit name=btnSubmit value=Submit></td>
</tr>
</table>
</form>
The script that should dynamically call up the values for the options in the select box look is:
<script language=vbscript>
Sub Window_OnLoad()
<%
Do While Not objRS.EOF
%>
Set objOption = document.createElement("OPTION")
objOption.text = "<%=objRS("TxCategoryName")%>"
objOption.value = "<%=objRS("TxCategoryName")%>"
document.all.cboCategory.add objOption
<%
objRS.MoveNext
Loop
%>
Set objOption = Nothing
End Sub
Sub btnSubmit_OnClick()
Call frmCategory.submit()
End Sub
</script>
<form method="POST" name="frmCategory" action="service.asp">
<table width="320">
<tr>
<td width="6"> </td>
<td align="center" width="147">
<select size="10" name="cboCategory"></select></td>
<td width="6">  </td>
<td width="6">  </td>
<td align="center" width="61">
<input type=submit name=btnSubmit value=Submit></td>
</tr>
</table>
</form>
The script that should dynamically call up the values for the options in the select box look is:
<script language=vbscript>
Sub Window_OnLoad()
<%
Do While Not objRS.EOF
%>
Set objOption = document.createElement("OPTION")
objOption.text = "<%=objRS("TxCategoryName")%>"
objOption.value = "<%=objRS("TxCategoryName")%>"
document.all.cboCategory.add objOption
<%
objRS.MoveNext
Loop
%>
Set objOption = Nothing
End Sub
Sub btnSubmit_OnClick()
Call frmCategory.submit()
End Sub
</script>