...

View Full Version : adding a fourth layer to the triple combo...



serv
06-05-2004, 05:45 PM
Hello,
I need to add a layer to the triple combo and would appreciate a helpfull tip.
Thanks
Roy

glenngv
06-07-2004, 07:20 AM
Please provide enough information to enable us to help you.

serv
06-07-2004, 09:57 AM
here is the code which i can't get to work:


<tr>
<td align="left">
<select name="region" size="1" onChange="redirect4(this.options.selectedIndex);">
<option selected>region</option>
<option>-----------</option>
<option>option 1</option>
</select>
</td>
</tr>

<tr>
<td align="left">
<select name="city" size="1" onChange="redirect5(this.options.selectedIndex)">
<option selected>city</option>
<option>-----------</option>
</select>
</td>
</tr>

<tr>
<td align="left">
<select name="quarter" size="1" onChange="redirect6(this.options.selectedIndex)">
<option selected>quarter</option>
<option>-----------</option>
</select>
</td>
</tr>

<tr>
<td align="left">
<select name="hood" size="1">
<option selected>neighborhood</option>
<option>-----------</option>
</select>
</td>
</tr>

<script>
<!--
var group4s=document.update.region.options.length
var group4=new Array(group4s)
for (i=0; i<group4s; i++)
group4[i]=new Array()

group4[0][0]=new Option(""," ");
group4[1][0]=new Option(""," ");

group4[2][0]=new Option("select...","");
group4[2][1]=new Option("opt1","1");

var temp4=document.update.city

function redirect4(x){
for (m=temp4.options.length-1;m>0;m--)
temp4.options[m]=null
for (i=0;i<group4[x].length;i++){
temp4.options[i]=new Option(group4[x][i].text,group4[x][i].value)
}
temp4.options[0].selected=true
redirect5(0)
}

var group5s=document.update.city.options.length
var group5=new Array(group4s)
for (i=0; i<group4s; i++) {
group5[i]=new Array(group4[i].length)
for (j=0; j<group4[i].length; j++) {
group5[i][j]=new Array() }}

group5[0][0][0]=new Option(""," ");
group5[1][0][0]=new Option(""," ");

group5[2][0][0]=new Option("select...","");
group5[2][1][0]=new Option("opt1","1");

var temp5=document.update.hood_cluster

function redirect5(y){
for (m=temp5.options.length-1;m>0;m--)
temp5.options[m]=null
for (i=0;i<group5[document.update.region.options.selectedIndex][y].length;i++){
temp5.options[i]=new Option(group5[document.update.region.options.selectedIndex][y][i].text,group5[document.update.region.options.selectedIndex][y][i].value)

}
temp5.options[0].selected=true
redirect6(0)
}


var group6s=document.update.quarter.options.length
var group6=new Array(group5s)
for (i=0; i<group5s; i++) {
group6[i]=new Array(group5[i].length)
for (j=0; j<group5[i].length; j++) {
group6[i][j]=new Array()
for (k=0; k<group5[j].length; k++) {
group6[i][j][k]=new Array() }}}

group6[0][0][0][0]=new Option(""," ");
group6[1][0][0][0]=new Option(""," ");

group6[2][1][0][0]=new Option("select..."," ");
group6[2][1][1][0]=new Option("opt1","1");

var temp6=document.update.hood
function redirect6(z){
for (m=temp6.options.length-1;m>0;m--)
temp6.options[m]=null
for (i=0;i<group6[document.update.region.options.selectedIndex][z].length;i++){
temp6.options[i]=new Option(group6[document.update.region.options.selectedIndex][z][i].text,group6[document.update.region.options.selectedIndex][z][i].value)
}

temp6.options[0].selected=true
}
//-->
</script>

glenngv
06-07-2004, 10:29 AM
Try this:

http://www.codingforums.com/showthread.php?t=3374

or this:

http://www.codingforums.com/showthread.php?t=28544

In the future, I suggest you to search this forum first before asking. Almost always, common questions such as yours have been asked and answered before.

serv
06-07-2004, 12:23 PM
I did search but.. obviously not enough. Thanks.

glenngv
06-07-2004, 12:31 PM
Using the right keyword to search is the key to getting more results. If you used "quadruple", you will get more results. ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum