onChange select pulldown lists - onChange select pulldown lists
I have two select pulldown lists. What I'm wanting to do is when you choose something from the first list, the options of the second list changes according to what you chose. How is this done??
John Pollock posted this at 20:18 — 23rd August 1999.
He has: 628 posts
Joined: Mar 1999
I'm pretty sure it is possible, but I'm not quite sure how to code it. There are a few people here that have more experience in the form area that should be able to help out though.
Java Script: A Beginner's Guide
Page Resource
JP Stones posted this at 02:22 — 24th August 1999.
They have: 2,390 posts
Joined: Nov 1998
Hmmm, I saw this done on the link exchange site when signing up for the banner service - take a look at that and see if that is what you need...
JP
----------
The Webmaster Forums General Administrator
[red]Why not visit:[/red] The Next Step in Website Development - http://www.what-next.com
Flicki posted this at 01:55 — 1st September 1999.
They have: 8 posts
Joined: Mar 1999
This link demonstrates a pulldown with a select box:
http://www.hotwired.com/webmonkey/98/04/index3a_page10.html?tw=javascript
Flicki
Anonymous posted this at 18:52 — 1st September 1999.
They have: 5,633 posts
Joined: Jan 1970
Here is a script that will change the names and the values. You setup the values in the following arrays.
var newSelectionName = new Array();
newSelectionName[0] = "NAME1";
newSelectionName[1] = "NAME2";
var newSelectionValue = new Array();
newSelectionValue[0] = "VALUE1";
newSelectionValue[1] = "VALUE2";
function changeSelections() {
document.FORM.SELECT.options.length = 0;
for (i=0; i<.newSelectionName.length-1; i++) {
eval("document.FORM.SELECT.options[" + i + "] =
new Option(newSelectionName[" + i + "],newSelectionValue[" + i + "])");
} document.FORM.SELECT.options[0].selected = true;
}
----------
[email protected]
vegas.com.au/~jasper
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.