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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Box Option Values Not Appearing

Status
Not open for further replies.

carpediem79

Technical User
Aug 2, 2005
52
US
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">&nbsp;</td>

<td align="center" width="147">
<select size="10" name="cboCategory"></select></td>

<td width="6">&nbsp </td>
<td width="6">&nbsp </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>
 
><script language=vbscript>
Not supported in "Firefox or Safari".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top