473,324 Members | 2,196 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,324 software developers and data experts.

How to refresh an ASP list/menu following selection from a preceding list/menu

Greetings,

I am using Dreamweaver CS3 to design an ASP page that contains an Insert Record Form. Within this form are two list/menu form fields that I would like to "synchronize". In other words, let's say one list/menu is where the user selects "Program Name" and a second is for selecting "Project Name". If the user makes a selection from the first list/menu, then the second list/menu is requeried and "refreshed" to show only the project names for the selected program name.

I understand the problem with ASP being a server-side technology and that it ceases to work as soon as the page is loaded. I need some client-side scripting to make this work and I want to know how to do this with javascript because my efforts to refresh my page each time and send the parameters through a querystring haven't been very successful.

I can post code for what I have thus far should anyone want to see it, but thought I'd pose the question first to see if anyone has any advice or URL links/examples to point me toward.

Any advice or suggestions would be most welcome.

- JM
Jul 2 '08 #1
5 1861
acoder
16,027 Expert Mod 8TB
You have two choices. Either load all the options (in arrays) during page load and use them onchange, or whenever a change occurs, make an Ajax request to get the options for that particular project. Which one would you prefer or is more appropriate in your case?
Jul 3 '08 #2
The first one (loading options in arrays) is probably more appropriate given my limited java knowledge.
Jul 3 '08 #3
acoder
16,027 Expert Mod 8TB
You should find this link useful.

Note that it's JavaScript, not Java.
Jul 3 '08 #4
Thanks for the link. Do you also have a link for the Ajax request option? I ask because if I run into issues with the JavaScript, it would be nice to have a backup plan.
Jul 3 '08 #5
acoder
16,027 Expert Mod 8TB
Here's a quick general Ajax example. What you would do is change the ASP to return the options of the list. You can either return the HTML and just set a select object's innerHTML to the response or return a delimited which you can split to get the options.
Jul 3 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Roberto Dias | last post by:
Could anyone give me some tips about how to start a menu-based console application using C++ function oriented programming techniques? I'm a FORTRAN-based electrical engineer and a newbie on C++...
1
by: Wouter | last post by:
Hi, I would like to make a dropdown menu. When a user select something i want to use his selection in PHP for a next dropdown menu. When the user has selected something in the second dropdown...
0
by: P Mitchell | last post by:
Hello I would like someone to be able to help with the updating of data in a lookup list in a subform. In short, is their a VB instruction that is the equivalent of performing the action of...
5
by: Scott Lyon | last post by:
I am having a strange problem. The program is a bit complex, but I'll try to simplify what I can. I apologize if this is complicated, but I think this would still be simpler than posting a bunch of...
4
by: fizzyfozzy | last post by:
Hi, I am trying to figure out how to show or hide a selection of divs on my page depending on what is selected from a list/menu item, using css & javascript. I have tried to use the script...
14
namcintosh
by: namcintosh | last post by:
Hello, everyone. Well, let me cut to the chase and explain my problem. I am trying to devise a menu plan that uses the if/else if and the while loop. The program calculates the user's weight...
1
by: Harlan Messinger | last post by:
I'm sure this is covered on the Web, but I can't figure out a sufficiently narrow Google query: Suppose I have a hierarchical website structure Page 1 Page 1a Page 1b Page 1b1 Page 1b2 Page...
1
by: Kayvine | last post by:
Hi guys, this is a question I have for an assignment, it is pretty long, but I am not asking for the code(well if someone wants to write I'll be really happy, lol), but I just want to know how to...
2
by: billa856 | last post by:
Hi, My project is in MS Access. In that I have one Form in which I have some Comboboxes. 1st one is Independent, 2nd one is dependent on first one, 3rd one is dependent on 1st and 2nd both....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.