G
Guest
I have a little vbScript that is invoked by onclick in
one of the option lines of a select structure. With the
msgbox in the script, it works fine and returns the index
of the option clicked. With msgbox deleted (or commented
out), it always returns -1.
Any suggestions?
Gerry Metze
<script language="vbscript">
Sub selNm
ix = -1
msgbox "in selNm"
For i = 0 To formNx.selNx.Length - 1
If formNx.selNx.Options(i).Selected _
= True Then ix = i
Next
navigate("QSelect.asp?HP=2&NMix=" & ix)
End Sub
........
<body>
<form name="Nx">
<fieldset>
<select align="left" multiple size="15" name="selNx"
onclick="selNm">
<% For i = 1 To UBound(VV)
Response.Write "<option
onclick=""selNm2"">" & VV(i) & "</option><br>"
Next %>
</select>
</fieldset>
</form>
one of the option lines of a select structure. With the
msgbox in the script, it works fine and returns the index
of the option clicked. With msgbox deleted (or commented
out), it always returns -1.
Any suggestions?
Gerry Metze
<script language="vbscript">
Sub selNm
ix = -1
msgbox "in selNm"
For i = 0 To formNx.selNx.Length - 1
If formNx.selNx.Options(i).Selected _
= True Then ix = i
Next
navigate("QSelect.asp?HP=2&NMix=" & ix)
End Sub
........
<body>
<form name="Nx">
<fieldset>
<select align="left" multiple size="15" name="selNx"
onclick="selNm">
<% For i = 1 To UBound(VV)
Response.Write "<option
onclick=""selNm2"">" & VV(i) & "</option><br>"
Next %>
</select>
</fieldset>
</form>