SELECT OPTION: changing dynamically

D

David Clark

Hi
I have two list boxes( i.e. SELECT OPTION ), one is for STATE and
second is for CITY. If I change the STATE, CITY should also be updated
and of course it will be having respective cities
How to accomplish this ?
I need quick reply, plz
Thnaks
 
L

Lee

Philip said:
Easy. Get rid of the list boxes.

Instead, use text input boxes with meaningful names (e.g., "street", "city",
"state", "zip", etc.).

That way the user can fill your form in with a single click of the "Auto
Complete" button.

Ok, where's my "Auto Complete" button?
 
F

Fred Serry

David Clark said:
Hi
I have two list boxes( i.e. SELECT OPTION ), one is for STATE and
second is for CITY. If I change the STATE, CITY should also be updated
and of course it will be having respective cities
How to accomplish this ?
I need quick reply, plz
Thnaks

Hi,

http://www.serry.net/javascript/select.html

This is tested for ie4+, ns4, mozilla1.3 and opera7. btw: most of them don't
autocomplete.

Fred
 
P

Philip Ronan

Hi,

http://www.serry.net/javascript/select.html

This is tested for ie4+, ns4, mozilla1.3 and opera7. btw: most of them don't
autocomplete.

Fred

But what's the point? To get the OP's plan working you would have to create
a js file containing a list of every single city in every single state of
the US (well let's not bother about the rest of the world for the time
being) and force the user to download it every time they visit the page.

So the user will probably have to wait far longer for the page to download
than it would have taken just to type in their address in the first place.
Even if they can't find the Auto Complete button

Besides, the user will still have to enter the street address and phone
number, unless you're planning on including a few million pages out of the
phone book into this js file.

And how are text-to-speech browsers going to cope with this? Or browsers
with Javascript turned off?

....OK, I'll shut up now :)
 
F

Fred Serry

Philip Ronan said:
But what's the point? To get the OP's plan working you would have to create
a js file containing a list of every single city in every single state of
the US (well let's not bother about the rest of the world for the time
being) and force the user to download it every time they visit the page.

So the user will probably have to wait far longer for the page to download
than it would have taken just to type in their address in the first place.
Even if they can't find the Auto Complete button

Besides, the user will still have to enter the street address and phone
number, unless you're planning on including a few million pages out of the
phone book into this js file.

And how are text-to-speech browsers going to cope with this? Or browsers
with Javascript turned off?

...OK, I'll shut up now :)

Hi Philip,

First of all, OP never stated that his intent was to produce an exhoustive
list of all cities in the USA, nor that his page is used to enter personal
data. As far as I'm concerned he is making a list of bus destinations on the
Fiji Islands or a picker for coconut plantations in Denmark. Your guess to
those facts were just that: guesses. My reason to answer was that his actual
question was not.

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top