Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 6th, 2007, 01:33 AM
Authorized User
 
Join Date: Dec 2006
Location: chennai, tn, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Drop down list

Hi,

I have two drop down list in ASP Page.
Eg. country and city
intially, country dropdown list is populated and city dropdownlist doesnt have any value. Once i select country in the onchange event i triggered to submit the page and city is populated with the relevant data but country got refreshed and now able to hold/retain the SELECTED value of the country.

Note: All datas are taken from SQLSERVER 2000 database.
To retain the value is anything to be done in javascript.
Pls help in this which is more critical for me.

Thanks in advance.

Chandru
__________________
Thanks,
Chandra
Reply With Quote
  #2 (permalink)  
Old February 6th, 2007, 02:37 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When the submit is being handled, you are using the value from the Country dropdown to retrieve the cites for that country. You can use that same country value to set the "SELECTED" attribute of the option that the user has selected. This will make it display as being the seelcted country.

I assume you are using a loop to populate the country dropdown. Now you will have to check for each country if it is the seleted one, and give it the SELECTED attribute.



Woody Z
http://www.learntoprogramnow.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down list ashu_gupta75 Excel VBA 1 October 15th, 2007 05:52 PM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 6 March 18th, 2005 03:32 AM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 8 September 16th, 2004 07:11 AM



All times are GMT -4. The time now is 05:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.