Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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 March 3rd, 2004, 07:06 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default search select control

Hi friends,

  I have 1000 items in the select control. I want to select an item automatically while typing the characters. Just like " index in the HTML help"

How can i do this.

Thanx in advance

 
Old March 3rd, 2004, 10:56 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You'll need to create some javascript functionality to do this.

Use the onKeyUp event in the textbox you are entering the search string.
Loop thru the items in the select control and compare against the search string. You'll have to do a partial comparison so you can match the beginning of the options with what you have typed.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 3rd, 2004, 11:13 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I have seen some ready built ones, search for DHTML combobox on Google.

--

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Statement Help!!! PLEASE!!! Long Search Jonvan20 Access VBA 7 December 12th, 2006 02:04 PM
Using textbox, button control to search database aad1 C# 4 May 17th, 2006 06:54 PM
Quesetion about search and SQL data control HoosierDaddy61 ASP.NET 2.0 Basics 3 February 25th, 2006 05:13 AM
get error when SELECT search starts with "@" abbylee26 Classic ASP Databases 1 March 15th, 2004 03:37 PM
How to search for (and select) a record? Haroldd Access 2 June 30th, 2003 06:50 PM





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