|
-
Apr 17th, 2003, 03:45 AM
#1
Thread Starter
New Member
thirdGroup java scripts
where error?
Can someone help me pls.....
<FORM name="isc">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td nowrap height="11">
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>Seleccioné</option>
<option>Sitios Webmaster</option>
<option>Sitios Nuevos</option>
</select>
<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected>Seleccioné</option>
<option value=" " selected>Seleccioné</option>
</select>
<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected>Seleccioné</option>
<option value=" " selected>Seleccioné</option>
</select>
<select name="stage4" size="1" onChange="redirect3(this.options.selectedIndex)">
<option value="javascript:"#"" selected>Seleccioné</option>
</select>
<script>
<!--
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("Seleccioné"," ");
group[1][0]=new Option("Seleccioné"," ");
group[1][1]=new Option("JavaScript","47");
group[1][2]=new Option("DHTML","46");
group[1][3]=new Option("CGI","45");
group[2][0]=new Option("Seleccioné"," ");
group[2][1]=new Option("Noticias en General","115");
group[2][2]=new Option("Noticias en Technologia","116");
var temp=document.isc.stage2
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)
redirect2(0)
}
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("Seleccioné"," ");
secondGroup[1][0][0]=new Option("Seleccioné"," ");
secondGroup[1][1][0]=new Option("Seleccioné"," ");
secondGroup[1][1][1]=new Option("LINK 1"," ");
secondGroup[1][1][2]=new Option("LINK 2"," ");
secondGroup[1][1][3]=new Option("LINK 3"," ");
var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
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)
}
temp1.options[0].selected=true
redirect2(0)
}
//************************************************
//************************************************
//************************************************
//************************************************
//************************************************
//************************************************
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()
for (k=0; k<group[i].length; k++) {
thirdGroup[i][j][k]=new Array() }}}
thirdGroup[0][0][0][0]=new Option("Seleccioné"," ");
thirdGroup[1][0][0][0]=new Option("Seleccioné"," ");
thirdGroup[1][1][1][0]=new Option("Seleccioné"," ");
thirdGroup[1][1][1][0]=new Option("JavaScript 1","www. ");
thirdGroup[1][1][1][1]=new Option("JavaScript 2","www. ");
thirdGroup[1][1][1][2]=new Option("JavaScript 3","www. ");
var temp2=document.isc.stage4
function redirect2(z){
for (m=temp2.options.length-1;m>0;m--)
temp2.options[m]=null
for (i=0;i<thirdGroup[document.isc.stage2.options.selectedIndex][z].length;i++){
temp2.options[i]=new Option(thirdGroup[document.isc.stage2.options.selectedIndex][z][i].text,thirdGroup
[document.isc.stage2.options.selectedIndex][z][i].value)
}
temp2.options[0].selected=true
}
function redirect3(w){
window.location=temp2[w].value
}
//-->
</script>
</td>
</tr>
</table>
</FORM>
Last edited by joni; Apr 17th, 2003 at 06:22 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|