Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problems Using onchange with option lists

Reply
Thread Tools

Problems Using onchange with option lists

 
 
Mirovk
Guest
Posts: n/a
 
      09-01-2006
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
%>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<select..onchange() > with only one <option> The Natural Philosopher Javascript 15 10-02-2007 07:15 AM
List of lists of lists of lists... =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==?= Python 5 05-15-2006 11:47 AM
how to make onchange to list common lists john woo Javascript 8 07-04-2005 07:31 PM
HTML Select, OnChange on <option>? @sh Javascript 2 04-26-2005 11:30 AM
g++ -pg option and -shared option Julien ROUZIERES C++ 1 12-21-2004 02:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57