473,499 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linked dropdowns

I am still learning more of Javascript, so please bear with me.

My objective is to have a dropdown list for categories. Depending upon
what the user clicks, I want the subcategories dropdown to change
content. I am sure this has been done many times and a pointer would be
helpful. I googled, but didn't find anything (Maybe because I don't
know the right keywords to use). The back end server code is in php, so
an ASP solution is not viable.

My idea is to attach and onchange to the category dropdown. Depending
upon the value in that dropdown, I would read the contents of a file on
the server and via innerHTML change the contents of the subcategory
dropdown list. In my googling, all I seem to come up with is reading
from the user's machine. These files would be on the server, so it
really should be much easier, but I haven't found it.

I know I can do this with php, however that involves either regenerating
the page or using AJAX. I am looking to see if there is a straight
javascript solution.

BTW, if there is a better way I am totally open to suggestions.
Jun 27 '08 #1
1 1240
sheldonlg wrote:
I am still learning more of Javascript, so please bear with me.

My objective is to have a dropdown list for categories. Depending upon
what the user clicks, I want the subcategories dropdown to change
content. I am sure this has been done many times and a pointer would be
helpful. I googled, but didn't find anything (Maybe because I don't
know the right keywords to use). The back end server code is in php, so
an ASP solution is not viable.

My idea is to attach and onchange to the category dropdown. Depending
upon the value in that dropdown, I would read the contents of a file on
the server and via innerHTML change the contents of the subcategory
dropdown list. In my googling, all I seem to come up with is reading
from the user's machine. These files would be on the server, so it
really should be much easier, but I haven't found it.

I know I can do this with php, however that involves either regenerating
the page or using AJAX. I am looking to see if there is a straight
javascript solution.

BTW, if there is a better way I am totally open to suggestions.

I did it with an AJAX technique.
Jun 27 '08 #2

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

Similar topics

3
1565
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the...
1
1454
by: Andy | last post by:
What I want to do is to populate multiple dropdowns when editing. Presumably... a) I should use a DataReader so that I can get each ResultSet for each dropdown control, and that should cut down...
3
1207
by: Simon Harvey | last post by:
Hi everyone, I keep getting a problem with dropdownlist controls. It sounds really stupid, but my app is screwed as long as this keeps happening. It seems to spontaneously happen and then I...
0
1599
by: bogorman | last post by:
Am trying to add a "video" to a webpage which is based on a template containing a javascript menu. The site has hundreds of pages all based on this template and the menu works fine The page can be...
0
953
by: sbart | last post by:
I am programing in asp.net vb using AjaxToolkit cascadingDropDown. I do not have access to AjaxToolkit cascading dropdown event handlers. I have a series of dropdowns. The selection from one of...
0
7134
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
7012
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...
1
6901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5479
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,...
1
4920
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...
0
3105
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
307
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.