View Full Version : Resolved Triple Drop-Down

09-02-2008, 05:27 PM
I'm working to create a triple drop-down menu. So far the first two drop-downs seems to work fine but I'm stuck on the third. None of the options appear when a selection is made from the second drop-down.

Below is my code ... Any help would be greatly appreciated!!

My goal is to have the appropriate video appear under the drop-down menu based on the selections made.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Company Meetings</title>

<form name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td> &nbsp;

<select name="example" size="1" onchange="redirect(this.options.selectedIndex)">
<option selected="selected">---Select Year-------------</option>

<select name="stage2" size="1" onchange="redirect1(this.options.selectedIndex)">
<option value=" " selected="selected"> </option>
<option value=" " selected="selected">---Select Month--------------</option>
<option value=" " selected="selected">---Select Month--------------</option>

<select name="stage3" size="1" onchange="redirect2(this.options.selectedIndex)">
<option value=" " selected="selected"> </option>
<option value=" " selected="selected">---Select Video----------------</option>
<option value=" " selected="selected">---Select Video----------------</option>

<script type="text/javascript">

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

group[0][0]=new Option("---Select Month---"," ");

/* 2008 Month Options */
group[1][0]=new Option("March","48");
group[1][1]=new Option("April","47");
group[1][2]=new Option("May","46");
group[1][3]=new Option("June","45");
group[1][4]=new Option("August","44");

/* 2007 Month Options */

group[2][0]=new Option("November","114");
group[2][1]=new Option("December","115");

var temp=document.isc.stage2

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

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 Video---"," ");
secondGroup[1][0][0]=new Option("---Select Video---"," ");

/* March 2008 */
secondGroup[1][1][0]=new Option("Select Video"," ");
secondGroup[1][1][1]=new Option("Management","");
secondGroup[1][1][2]=new Option("Operations","");
secondGroup[1][1][3]=new Option("Marketing & Task Leads","");
secondGroup[1][1][4]=new Option("Technical","");
secondGroup[1][1][5]=new Option("Slides","");

/*April 2008*/
secondGroup[1][2][0]=new Option("Select Video"," ");
secondGroup[1][2][1]=new Option("Technical"," ");

/*May 2008*/
secondGroup[1][3][0]=new Option("Select Video"," ");
secondGroup[1][3][1]=new Option("Management"," ");
secondGroup[1][3][2]=new Option("Operations","");
secondGroup[1][3][3]=new Option("Marketing","");
secondGroup[1][3][4]=new Option("Task Leads","");
secondGroup[1][3][5]=new Option("Technical","");

/*June 2008*/
secondGroup[1][4][0]=new Option("Select Video"," ");
secondGroup[1][4][1]=new Option("Management"," ");
secondGroup[1][4][2]=new Option("Operations","");
secondGroup[1][4][3]=new Option("Marketing","");
secondGroup[1][4][4]=new Option("Task Leads","");

/* January 2007 */
secondGroup[2][0][0]=new Option("---Select Video---"," ");
secondGroup[2][1][0]=new Option("Select Video"," ");
secondGroup[2][1][1]=new Option("Management"," ");
secondGroup[2][1][2]=new Option("Operations","");
secondGroup[2][1][3]=new Option("Marketing","");
secondGroup[2][1][4]=new Option("Task Leads","");

/* February 2007 */
secondGroup[2][2][0]=new Option("Select Video"," ");
secondGroup[2][2][1]=new Option("Management"," ");
secondGroup[2][2][2]=new Option("Technical","");

var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)

function redirect2(z){





09-02-2008, 06:05 PM
No. I won't go outside the forum.

09-02-2008, 06:14 PM
This is how the web page describes to use the code and it works fine until you get to my third drop-down. When I made changes to the options I'm not sure what got messed up because if you copy the code from the web page and save it as a html page it works just fine.


09-02-2008, 06:17 PM
No. I won't go outside the forum. I DID help. I posted code, but you ignored it, so I deleted it. You have no trouble posting links, but can't bring yourself to write a simple "thanks for responding."

09-02-2008, 06:29 PM
I'm a little confused by your short and abrupt responses .... it really doesn't seem like you want to help ... which is fine. I'm not sure why you won't go outside the forum to better understand why I did it the way I did considering your remark about the <script> listed within the <body> and the fact that I was directed to these forums from the web page link I posted.


If anyone has the time to look at this and help guide me I would appreciate it! I just want to understand where I went wrong .... thanks again!!

09-03-2008, 03:01 PM
I never saw any code listed in response to my question! Maybe if you had given me a chance to look at it I would have been able to thank you.

Last post I SAW was the one comment about where in my code I had included the script. I replied with the link and then saw the rude posts. If you did take the time to look and post a helpful reply ... thank you! However, the short/rude response and removal of code before I even had a chance to read them was unnecessary. Since not everyone has time to sit and stare at their forum posts maybe next time you should give someone a chance before "jumping the gun" and making accusations about how grateful someone can be when receiving help.

Sorry! but NO you DIDN'T help me.

Fortunately I was able to figure this out on my own and now have working drop-downs.