473,657 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SELECT OPTION: changing dynamically

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
Jul 20 '05 #1
7 8069
Lee
Philip said:

On 03.8.3 9:52 PM, David Clark wrote:
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


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?

Jul 20 '05 #2
On 03.8.3 11:29 PM, Lee wrote:
Philip said:

On 03.8.3 9:52 PM, David Clark wrote:
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


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?


It's not my problem if you don't know how to work your goddamn browser.

--
Philip Ronan
ph***********@v irgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #3
Hello,

http://lgwm.org/ozone/dynatable.htm

This is a long example try to find your answer there.

Elias
Jul 20 '05 #4

"David Clark" <da************ @hotmail.com> schreef in bericht
news:28******** *************** ***@posting.goo gle.com...
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
Jul 20 '05 #5
On 03.8.4 9:31 PM, Fred Serry wrote:

"David Clark" <da************ @hotmail.com> schreef in bericht
news:28******** *************** ***@posting.goo gle.com...
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


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 :-)

--
Philip Ronan
ph***********@v irgin.net
(Please remove the "z"s if replying by email)
Jul 20 '05 #6

"Philip Ronan" <ph***********@ virgin.net> schreef in bericht
news:BB5483E4.1 7674%ph******** ***@virgin.net. ..
On 03.8.4 9:31 PM, Fred Serry wrote:

"David Clark" <da************ @hotmail.com> schreef in bericht
news:28******** *************** ***@posting.goo gle.com...
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


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 :-)

--
Philip Ronan
ph***********@v irgin.net
(Please remove the "z"s if replying by email)


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
Jul 20 '05 #7
"Fred Serry" <ge*******@hotm ail.com> writes:
a list of bus destinations on the Fiji Islands or
'Every town and village has a bus stop'
<URL:http://fiji-backpacking.com/transport/bus-taxi.html>
So that's just a list of towns and villages of Fiji.
a picker for coconut plantations in Denmark.


That one is easy, the code is between the "---"'s;
---

---

/L 'Dane'
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5915
by: Rithish | last post by:
Is there a way to obtain the height of a <SELECT> element dynamically, i.e. through javascript? I want to dynamically display a list box onFocus of a text box element. Also, if the list box would move out of the bottom screen area, I would want to move it up by that fraction so that it displays at the bottom of the screen. To do this, I would need to acquire the height of the SELECT element. I tried quite a few methods. ...
3
15610
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing only <option> tags is fairly easy and there is plenty of material on the net to assist with this. However, I have searched long and found the material on the subject of <optgroup> to be sparse, with a few posts here & there, but basically you're...
8
3912
by: Bosconian | last post by:
I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back and forth by double clicking on them. This portion works perfectly, but I would also like to change the background color of the select element with the current focus. I have defined the following classes: ..selected {
7
13438
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got the select box filling with code similar to below: <SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER> Public Sub BuildComboBox(rs, dispname, val, name, selected) 'rs = the recordset 'val = fieldname to place in the val of the option
6
2184
by: tuxedo | last post by:
I have a fixed html structure, where only one form and a simple select menu will exist on an html page, as follows: <form action="order" method="POST"> <select name="dinner"> <option value="1">Pizza</option> <option value="2">Hot Vindaloo</option> <option value="3">Fish-n-Chips</option> <option value="4">Currywurst</option>
2
12425
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck into converting into code.
2
8417
by: simon.wilkinson | last post by:
Hi, I am trying to update all Select boxes on a page dynamically using javascript, I simple want to change the selected item in each select box when a tick box is pressed on the page. Each Select box is named in the same convention ie. ddl_DeliveryStatus_ and then the recordID and contains the same options in the same order. The number of select boxes changes every time the page is loaded as this is all built using ASP linked to a...
16
2951
by: =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= | last post by:
I need a form control for the user to enter currency symbol. A select control seems to be fit for that purpose; but the problem is that the control must appear on the page several times so the formula for page size gets bounded from below by number of controls times number of currencies. Which means that 1) the page must be produced on the fly in order to be consistent, 2) the data to be transmitted can grow excessively because the...
10
2249
by: mjpdatadev | last post by:
I am relatively new to XMLRequest, DOM and Ajax but I really like the functionality. I have the DIV and SPAN changes working well but I thought that I would experiment with changing the actual innerHTML of each control rather than changing the whole control inside of a DIV. What I tried was this: Create a <SELECTso... <SELECT id=MyComboBox> <OPTION>opt1</OPTION>
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.