Click to See Complete Forum and Search --> : four combo box script


zuzupus
06-18-2003, 04:29 AM
hi,
anybody knows four combo box script please let me know as i no triple combo box script but i struck with all loop kind of things its very confusing---

thanks in advance

zuzupus
06-18-2003, 05:08 AM
hi,
if anybody knows four combo box script i will be very glad i got 3 combo box script from http://www.javascriptkit.com/script/script2/triplecombo.shtml

but no idea to make four as i am getting lot of error while implementing 3 combo script if anybody knows any site or script it will be appreciated.

thanks

pyro
06-18-2003, 07:35 AM
Moderators Note: This is a javascript question, and has been moved to that forum.

zuzupus
06-18-2003, 08:23 AM
Hi,

when user selects any items from first ,itemas from combo box second and third is changing but only problem is fourth combo how to arrange for this that when user selects second combo items fourth will change.
the items related to 2ndand 4th as when user selects 2nd combo is mention in text file

i am attaching the code please anybody help me out how to do this

thanks

zuzupus
06-18-2003, 08:33 AM
<FORM name="tstest">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11"> &nbsp;
<select name="kunde" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>VD</option>
<option>Bosch EW</option>
</select>

<select name="projekt" size="1" onChange="redirect1(this.options.selectedIndex)">
<option selected>00_1001_Orga</option>
<option>00_1002_Werb</option>
<option>00_0000_Pause</option>
</select>

<select name="hvorgang" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected>Orga</option>
<option value=" " selected>Werbung</option>
<option value=" " selected>Konstruktion</option>
<option value=" " selected>Konzeption</option>
<option value=" " selected>Kommunikation</option>
</select>

<select name="uvorgang" size="1" >
<option value=" " selected>Emails lesen </option>
<option value=" " selected>Besprechung</option>
<option value=" " selected>Aufräumen</option>
<option value=" " selected>Installation/Rep</option>
<option value=" " selected>Besorgung</option>
<script>
<!--




var groups=document.tstest.kunde.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()

group[0][0]=new Option("00_1001_Orga","00_1001_Orga");
group[0][1]=new Option("00_1002_Werb","00_1002_Werb");
group[0][2]=new Option("00_0000_Pause","00_0000_Pause");

group[1][0]=new Option("12_1850_01_Licht","12_1850_01_Licht");

var temp=document.tstest.projekt


function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}



var secondGroups=document.tstest.projekt.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}

secondGroup[0][0][0]=new Option("Orga","Orga");
secondGroup[0][1][0]=new Option("Werbung","Werbung");
secondGroup[0][2][0]=new Option("Pause","Pause");

secondGroup[1][0][0]=new Option("Konstruktion","Konstruktion");
secondGroup[1][0][1]=new Option("Konzeption","Konzeption");
secondGroup[1][0][2]=new Option("Kommunikation","Kommunikation");


var temp1=document.tstest.hvorgang
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.tstest.kunde.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.tstest.kunde.options.selectedIndex][y][i].text,secondGroup[document.tstest.kunde.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true

}


</script>

</td>
</tr>
</table>
</FORM>
*****************************************
sec. combo 3rd combo 4th combo

Projektnr. H-Vorgang U-Vorgang

00_1001_Orga Orga Emails lesen
Besprechung

00_1002_Werb Werbung Telefon
Service
Grafik

12_1_Licht Konstruktion CAD Modelling
CAD Zeichnung
CAD Vorbereitung
FEM

Konzeption Recherche
Besprechung mit
Entwurf

Kommunikation Email
Fahrzeit


00_0000_Pause Pause Pause

**************************************************

Khalid Ali
06-18-2003, 09:03 AM
just copy the code for one drop down box one more time and change the name of this new list box...thats all there is in it.

Khalid Ali
06-18-2003, 09:05 AM
Just noticed...Why you had to create another thread for the same topic??

zuzupus
06-18-2003, 09:11 AM
sorry i didn't get you how fouth combo will change when user select any on second and third combo box.

i dont understood where i created a new thread for this topic sorry for this,if i did :(