Hi:
you can write a function to set the list box value when user finish key in
the city name on the text box. somthing like this will do
fucntion ()
{
var textValue = document.form1.text1.value
for (i=0;i<document.form1.listbox1.options.length;i++)
{
if (textValue == document.form1.listbox1.options[i])
{
document.form1.listbox1.selectedIndex = i;
}
}
}
try this out, it may not work as you wish coz I haven't test it out.
>From: "Faisal Azhar" <faisalazhar@y...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Selecting list box value automatically
>Date: Wed, 3 Jul 2002 22:53:35
>
>Hi
>I have a lot of fields in the form, out of these, i have one text box and
>list box, list box has already values in it(cities names)
>User will enter city in text box and i want to select that city in list
>box automatically. (provided tht text box value and list box values will
>be same)
>Thanks a lot
>Faisal.
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com