Problems Using onchange with option lists

M

Mirovk

I am trying to take actions using onchange with an option list without
success.

I am not able to fully populate the list without a bad bad behavior
(the list is not getting populated)

What I am looking for, is being able to call a sub procedure each time
a new item in the list is selected (of course after it has been
populated)

Below some of the code:

<%Sub Refresh
co_pais_envio_chk=co_pais_envio
window.location.href="checkout_direccion.asp"
End Sub%>

<%rs_pais.MoveFirst%>

<select name="cbo_pais_env" class="form1" id="cbo_pais_env"
onchange=<%call refresh%>">

<option value="0" size="25">Seleccione</option>

<%Do While Not rs_pais.EOF%>
<%if cint(rs_pais("id_pais")) > 1000 then%>

<option size="25" <%If CInt(co_pais_envio) =
CInt(rs_pais("id_pais")) Then %> selected <%End If%>
value="<%=rs_pais("id_pais") & "-" & rs_pais("co_zona_dhl_ve") & "-" &
rs_pais("co_zona_mrw_ve")%>"><%=UCase(rs_pais("no_pais"))%></option>

<%end if
rs_pais.MoveNext
Loop
rs_pais.movefirst

Do While Not rs_pais.EOF%>
<%if cint(rs_pais("id_pais")) < 1000 then%>

<option <%If CInt(co_pais_envio) = CInt(rs_pais("id_pais")) Then
%> selected <%End If%> value="<%=rs_pais("id_pais") & "-" &
rs_pais("co_zona_fedex") & "-" &
rs_pais("co_zona_dhl_exp")%>"><%=UCase(rs_pais("no_pais"))%></option>

<%end if
rs_pais.MoveNext
Loop
rs_pais.Close
Set rs_pais = Nothing
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top