Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 2nd, 2005, 05:03 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default alphabetically sort drop down menu

Code:
<select name="city" style="font-size:9px" onChange="form.submit()">
<%
set rscitycode = con.execute("select CityCode from dbo_tp_city where ProvinceName = '"& state &"' order by CityCode asc")
do until rscitycode.eof
set rscityname = con.execute("select dbo_tp_cityname.CityName,dbo_tp_city.CityCode from dbo_tp_cityname,dbo_tp_city where dbo_tp_city.CityCode = '"& rscitycode("CityCode") &"' and dbo_tp_cityname.CityCode = '"& rscitycode("CityCode") &"' order by dbo_tp_cityname.CityName")
%>
<option value="<%=rscityname("CityName")%>"><%=rscityname("CityName")%></option>
<% 
rscitycode.movenext
loop
%>
</select>
Is there a way to sort this drop-down alphabetically with ASP/Javascript?

TIA.

Picco


www.crmpicco.co.uk
www.crmpicco.co.uk.tt
www.milklemonadechocolate.uk.tt
www.griswolds.uk.tt
www.piccosmini.co.uk.tt
www.morton.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down menu mizlatic BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 February 11th, 2008 07:02 AM
Drop down menu antoneath Beginning PHP 1 January 27th, 2006 08:45 AM
drop-down menu crmpicco Javascript How-To 1 March 22nd, 2005 01:23 PM
right click menu hidden by drop-drown menu Andraw HTML Code Clinic 0 March 18th, 2005 03:28 PM
drop down menu scrowler Javascript 1 January 27th, 2005 05:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.