I would like to add a 4th combobox to the already popular ComboBoxTriple sample posted on
http://wsabstract.com.
-----Copy this code
<html>
<head>
<title>ComboBoxQuad</title>
</head>
<body>
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11">
<select name="stage1" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
onChange="redirect(this.options.selectedIndex)">
<option selected>---Select1-------------</option>
<option>1</option>
<option>2</option>
</select>
<select name="stage2" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select2--------------</option>
<option value=" " selected>---Select2--------------</option>
</select>
<select name="stage3" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------</option>
<option value=" " selected>---Select3----------------</option>
</select>
<select name="stage4" size="1" style="font-family: Lucida Console,Verdana, Tahoma, Arial; font-size: 9"
onChange="redirect3(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select4----------------</option>
<option value=" " selected>---Select4----------------</option>
</select>
<script>
<!--
/*
Triple Combo Script Credit
By Hamid Cheheltani/ Website Abstraction (
http://www.wsabstract.com)
Visit
http://wsabstract.com for this and over 400+ other scripts
*/
var groups=document.isc.stage1.options.length
var group=new Array(groups)
for (i=0; i<groups; i++){
group[i]=new Array()}
group[0][0]=new Option("---Select2---"," ");
group[1][0]=new Option("Now Select This One"," ");
group[1][1]=new Option("1.1","");
group[1][2]=new Option("1.2","");
group[2][0]=new Option("Now Select This One"," ");
group[2][1]=new Option("2.1","");
group[2][2]=new Option("2.2","");
var temp=document.isc.stage2
var secondGroups=document.isc.stage2.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("---Select 3---"," ");
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("1.1.1","");
secondGroup[1][1][2]=new Option("1.1.2","");
secondGroup[1][2][0]=new Option("Now Select This One"," ");
secondGroup[1][2][1]=new Option("1.2.1","");
secondGroup[1][2][2]=new Option("1.2.2","");
secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," ");
secondGroup[2][1][1]=new Option("2.1.1","");
secondGroup[2][1][2]=new Option("2.1.2","");
secondGroup[2][2][0]=new Option("Now Select This One"," ");
secondGroup[2][2][1]=new Option("2.2.1","");
secondGroup[2][2][2]=new Option("2.2.2","");
/*PROBLEM LIES HERE */
var temp1=document.isc.stage3
var thirdGroups=document.isc.stage3.options.length
var thirdGroup=new Array(groups)
for (i=0; i<groups; i++) {
thirdGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
thirdGroup[i][j]=new Array(secondGroup[i].length)
for (k=0; k<group[i].length; k++) {
thirdGroup[i][j][k]=new Array() }}}
/**/
thirdGroup[0][0][0][0]=new Option("---Select 4---"," ");
thirdGroup[1][0][0][0]=new Option("---Select 4---"," ");
thirdGroup[1][1][1][0]=new Option("Now Select A Page"," ");
thirdGroup[1][1][1][1]=new Option("1.1.1.1","http://www..com");
thirdGroup[1][1][1][2]=new Option("1.1.1.2","http://www..com");
thirdGroup[1][1][2][1]=new Option("1.1.2.1","http://www..com");
thirdGroup[1][1][2][2]=new Option("1.1.2.2","http://www..com");
thirdGroup[1][2][2][0]=new Option("Now Select A Page"," ");
thirdGroup[1][2][1][1]=new Option("1.2.1.1","http://www..com");
thirdGroup[1][2][1][2]=new Option("1.2.1.2","http://www..com");
thirdGroup[1][2][2][1]=new Option("1.2.2.1","http://www..com");
thirdGroup[1][2][2][2]=new Option("1.2.2.2","http://www..com");
thirdGroup[2][0][0][0]=new Option("---Select 4---"," ");
thirdGroup[2][1][1][0]=new Option("Now Select A Page"," ");
thirdGroup[2][1][1][1]=new Option("2.1.1.1","http://www..com");
thirdGroup[2][1][1][2]=new Option("2.1.1.2","http://www..com");
thirdGroup[2][1][2][1]=new Option("2.1.2.1","http://www..com");
thirdGroup[2][1][2][2]=new Option("2.1.2.2","http://www..com");
thirdGroup[2][2][2][0]=new Option("Now Select A Page"," ");
thirdGroup[2][2][1][1]=new Option("2.2.1.1","http://www..com");
thirdGroup[2][2][1][2]=new Option("2.2.1.2","http://www..com");
thirdGroup[2][2][2][1]=new Option("2.2.2.1","http://www..com");
thirdGroup[2][2][2][2]=new Option("2.2.2.2","http://www..com");
var temp2=document.isc.stage4
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)
}
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.stage1.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.stage1.options.selectedIndex][y][i].text,secondGroup[document.isc.stage1.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
redirect2(0)
}
function redirect2(z){
for (m=temp2.options.length-1;m>0;m--)
temp2.options[m]=null
for (i=0;i<thirdGroup[document.isc.stage1.options.selectedIndex][z].length;i++){
temp2.options[i]=new Option(thirdGroup[document.isc.stage1.options.selectedIndex][z][i].text,thirdGroup[document.isc.stage1.options.selectedIndex][z][i].value)
}
temp2.options[0].selected=true
}
function redirect3(z){
window.location=temp2[z].value
}
//-->
</script>
</td>
</tr>
</table>
</FORM>
<p>
<font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://wsabstract.com">Website Abstraction</a></font>
</p>
</body>
</html>