Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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
  #1 (permalink)  
Old November 20th, 2007, 06:07 PM
Registered User
 
Join Date: Nov 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic List in UPDATE page

ASP VBSCRIPT / SQL Server 2005 / Dreamweaver CS3

We have an update page with an Dynamic List with the option for multi-selections allowed. The field is populated from a recordset. I want to highlight the options already selected. For example:

say the recordset has the following options:
- one
- two
- three

and two and htree are already in the database: two, three

How can i populate the list with two and three already highlightd (selected)?

  #2 (permalink)  
Old November 21st, 2007, 03:22 AM
Authorized User
 
Join Date: Sep 2007
Location: , , .
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

you would need to loop through your recordset and see what values are selected by some sort of if statement logic....when you find a match the property you need to set for the option tag is called selected....you would add code like so:

Code:
<option value="one" selected="selected">one</option>


http://mynameissteve.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic selection of next page based on list box s gurupot JSP Basics 1 December 24th, 2007 06:03 AM
Update the Word template list on an ASP.NET page cJeffreywang ASP.NET 2.0 Basics 0 July 19th, 2007 06:32 PM
dynamic list al-hijjawi ASP.NET 1.0 and 1.1 Basics 3 April 7th, 2006 11:05 AM
Dynamic drop-down list lucian Dreamweaver (all versions) 2 July 8th, 2004 05:58 PM
Dynamic List Boxes swhite Access VBA 10 September 11th, 2003 01:27 PM





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