473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Common problem... What is the best solution?

Assume you have a page that has the following three drop down lists

List_Of_States (Contains 50 States)
List_Of_Counties (Contains a list of counties in the selected state)
List_Of_Cities (Contains a list of cities/towns in the selected
county)

The list of states is static.
The entire list of counties would be fairly small (~20 counties per state =
~1000 counties)
This translates to ~15K-20K of text/XML and could be in a hidden field
on the page.
Note: I think that's too big, but the question is hypothetical anyway.
The entire list of cities is too large to transmit and a trip to the
server would always be required.

Object of the game:
When the user selects a state (e.g. Idaho)
Replace (for example)
<SELECT NAME="List_Of_Counties" >
<OPTION > ADAMS
<OPTION> BAKER
<OPTION> KING
<OPTION> LEWIS
</SELECT>

with (for example)

<SELECT NAME="List_Of_Counties" >
<OPTION > KITSAP
<OPTION> MASON
<OPTION> PIERCE
<OPTION> ZULU
</SELECT>

Finally, force the browser to render the resultant stream.

A similar function would be needed to replace <SELECT NAME="List_Of_Cities">

Obviously, I can do this via ASP, but that means doing a postback every time
the user clicks a dropdown.
Moreover, a page might contain any number of data driven objects, and I only
want to reload one of them.
ASP caching strategies seem to be largely ineffective in solving the
problem.
Is there a java applet (or a commercial product) that can do what I want to
do? I'm an
experienced programmer, but I've never jumped into the java pool.
The state/county/city page discussed above is not important, nor am I
building
such a page. What I'm looking for is a general purpose way to
replace a control (and its contents) on a page. Any advice would be
appreciated.
email:
mi********@amsec.com

Nov 17 '05 #1
1 1330
You can do this with arrays in JavaScript and keep everything on the client.
With a few choices, this is not a problem. If you have a wide matrix of
choices, you are better to postback.

The general method is to set up the arrays at the top of the page and change
the array for the next control in line by calling a JavaScript routine
onClick or a similar event.

--
Gregory A. Beamer
MPV; MCP: +I, SE, SD, DBA

************************************************** ********************
Think outside the box!
************************************************** ********************
"bigbob" <bi*@bob.com> wrote in message
news:Ok**************@TK2MSFTNGP09.phx.gbl...
Assume you have a page that has the following three drop down lists

List_Of_States (Contains 50 States)
List_Of_Counties (Contains a list of counties in the selected state)
List_Of_Cities (Contains a list of cities/towns in the selected
county)

The list of states is static.
The entire list of counties would be fairly small (~20 counties per state = ~1000 counties)
This translates to ~15K-20K of text/XML and could be in a hidden field
on the page.
Note: I think that's too big, but the question is hypothetical anyway.
The entire list of cities is too large to transmit and a trip to the
server would always be required.

Object of the game:
When the user selects a state (e.g. Idaho)
Replace (for example)
<SELECT NAME="List_Of_Counties" >
<OPTION > ADAMS
<OPTION> BAKER
<OPTION> KING
<OPTION> LEWIS
</SELECT>

with (for example)

<SELECT NAME="List_Of_Counties" >
<OPTION > KITSAP
<OPTION> MASON
<OPTION> PIERCE
<OPTION> ZULU
</SELECT>

Finally, force the browser to render the resultant stream.

A similar function would be needed to replace <SELECT NAME="List_Of_Cities">
Obviously, I can do this via ASP, but that means doing a postback every time the user clicks a dropdown.
Moreover, a page might contain any number of data driven objects, and I only want to reload one of them.
ASP caching strategies seem to be largely ineffective in solving the
problem.
Is there a java applet (or a commercial product) that can do what I want to do? I'm an
experienced programmer, but I've never jumped into the java pool.
The state/county/city page discussed above is not important, nor am I
building
such a page. What I'm looking for is a general purpose way to
replace a control (and its contents) on a page. Any advice would be
appreciated.
email:
mi********@amsec.com

Nov 17 '05 #2

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

Similar topics

3
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below...
15
by: Jim | last post by:
This is probably a common question - What is the best CSS editor? I'm an old HTML dinosaur that just getting into CSS. My HTML editor from way back is Homesite. They (Macromedia) tout Topstyle Pro...
11
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
3
by: Garth17 | last post by:
I'm trying to figure out a solution for sharing common properties and methods in all me .aspx and .ascx pages. In classic ASP I would use include directives. So far I have made 2 base classes...
0
by: James MA | last post by:
I'm going to develop a common library for applications in both Windows and Windows Mobile, this library will contain the bussiness rule only, which only contain some simply mathematics, and it...
5
by: jonkersbart | last post by:
Dear, I have wrote a script and want to group some functions of the script in a separate modulo so that I can import the module in other scripts and use the same functions there.. The problem...
0
by: ulrik | last post by:
Hi, I have a C# solution with 3 projects, a server-part, a client-part and a common part. When I build the solution in VisualStudio or using plain MSBuild on the solution file, the outputs of...
4
by: | last post by:
I have learned about compartmentalizing my code base using Class Libraries. I have my common code such as my ORM framework broken out into their own Class Libraries, which are referenced as...
12
by: Helmut Jarausch | last post by:
Hi, I'm looking for an elegant solution of the following tiny but common problem. I have a list of tuples (Unique_ID,Date) both of which are strings. I want to delete the tuple (element) with...
6
Markus
by: Markus | last post by:
Things to discuss: Headers What are they? What does PHP have to do with headers? Why can they only be sent before any output? Common causes
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.