Problems Using onchange with option lists

Discussion in 'ASP General' started by Mirovk, Sep 1, 2006.

  1. Mirovk

    Mirovk Guest

    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
    %>
    Mirovk, Sep 1, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    704
    GianGuz
    Dec 21, 2004
  2. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    391
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  3. @sh
    Replies:
    2
    Views:
    309
  4. john woo

    how to make onchange to list common lists

    john woo, Jul 3, 2005, in forum: Javascript
    Replies:
    8
    Views:
    118
  5. The Natural Philosopher

    <select..onchange() > with only one <option>

    The Natural Philosopher, Sep 27, 2007, in forum: Javascript
    Replies:
    15
    Views:
    328
    The Natural Philosopher
    Oct 2, 2007
Loading...

Share This Page