Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 February 5th, 2007, 06:08 PM
Authorized User
 
Join Date: Jun 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default javascript - display items in listbox matching the

i have a web page with a textbox and a listbox.
the data to be displayed in the listbox is stored in an array on the client side.
i need to trap the keys when the users types in the textbox, and display the data related
to it from the data stored inn the array and populate the listbox(on the client side).

thanks
any kind of help would be appreciated


 
Old February 6th, 2007, 07:04 AM
Registered User
 
Join Date: Jan 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

to add items in listbox(lb)
------->
var newOption = document.createElement("option");
newOption.text = "abc";
newOption.value ="xyz";
document.getElementById('lb').options.add(newOptio n)<----------

to delete items from listbox........
document.getElementById('lb').remove(i);

put these lines in a loop and match the word entered in ur txtbox with ur array and fill the listbox




----------------------
Thank
[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting all listbox items Lucy_H85 C# 2005 2 December 1st, 2009 05:36 AM
unselecting items in a listbox Durkee VB.NET 2002/2003 Basics 9 October 8th, 2007 03:01 PM
Moving Items up and down in a listbox Brendan Bartley Access 15 September 18th, 2007 06:42 AM
Query to display non matching records. AJ Access VBA 1 April 7th, 2005 05:05 PM
javascript pattern matching... rbd Javascript 1 October 7th, 2004 12:20 PM





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