hola, ravanando qua e la ho trovato uno Js che sfruttando l'input in un dropDown mi modifica i contenuti di un drop down successivo, chiammiamolo subMenu.
io ho replicato in php il tutto, ma non mi funge .. qualcuno per caso ha la pazienza di vedere qui sotto il codice che genero per vedere se faccio qualche surlata ?
il codice originale lo potete vedere qui:
http://javascript.internet.com/forms...drop-down.html
codice:<head><SCRIPT LANGUAGE="JavaScript"> <!-- Begin team = new Array( new Array( new Array("GX 60",BLABLA), new Array("GX 50",BALBLA) ), null new Array( new Array("Tally 9114",BLABLA), new Array("Tally 9022",BLABLA), new Array("Tally 9312",BALBLA) ) ); function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) { var i, j; var prompt; // empty existing items for (i = selectCtrl.options.length; i >= 0; i--) { selectCtrl.options[i] = null; } prompt = (itemArray != null) ? goodPrompt : badPrompt; if (prompt == null) { j = 0; } else { selectCtrl.options[0] = new Option(prompt); j = 1; } if (itemArray != null) { // add new items for (i = 0; i < itemArray.length; i++) { selectCtrl.options[j] = new Option(itemArray[i][0]); if (itemArray[i][1] != null) { selectCtrl.options[j].value = itemArray[i][1]; } j++; } // select first item (prompt) for sub list selectCtrl.options[0].selected = true; } } // End --> </script> </HEAD> <BODY> <FORM NAME="main"> <SELECT NAME="Make" onChange="fillSelectFromArray(this.form.Team, ((this.selectedIndex == -1) ? null : team[this.selectedIndex-1]));"> <OPTION VALUE="-1">Select <OPTION VALUE=1>COMPUTER <OPTION VALUE=2>STAMPANTI </SELECT> <SELECT NAME="Team" SIZE="5"> <OPTION> </OPTION> <OPTION> </OPTION> <OPTION> </OPTION> <OPTION> </OPTION> <OPTION> </OPTION> </SELECT> </FORM>


Rispondi quotando
