1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
<html>
<head>
<title></title>
<script type="text/javascript">
<!--
function choix(boite)
{
var j, n;
var i = boite.selectedIndex;
var boite2 = document.getElementById("boite2");
var tab = null, liens = null;
n = boite2.options.length;
for(j = 1; j <n; j++)
boite2.remove(1);
if (i == 0)
{
return;
}
else
{
switch (i)
{
case 1 : tab = new Array("T1","T2","T3","T4","T5");
liens = new Array("T1.htm","T2.htm","T3.htm","T4.htm","T5.htm");
break;
case 2 : tab = new Array("S1","S2","S3");
liens = new Array("S1.htm","S2.htm","S3.htm");
break;
case 3 : tab = new Array("R1","R2","R3","R4","R5","R6");
liens = new Array("R1.htm","R2.htm","R3.htm","R4.htm","R5.htm","R6.htm");
break;
case 4 : tab = new Array("L1");
liens = new Array("L1.htm")
break;
case 5 : tab = new Array("P1","P2");
liens = new Array("P1.htm","P2.htm");
break;
}
for(j = 0; j<tab.length; j++)
boite2.options.add(new Option(tab[j], liens[j], false, false));
}
boite2.selectedIndex=0;
}
function ouvrepage(boite)
{
if (boite.selectedIndex!=0)
{
document.location.href = boite.value;
}
}
//-->
</script>
</head>
<body>
<form id="formulaire">
<select id="boite1" onchange="choix(this)">
<option selected="selected">...........Choisissez une rubrique...........</option>
<option>TTT</option>
<option>SSS</option>
<option>RRR</option>
<option>LLL</option>
<option>PPP</option>
</select>
<select id="boite2" onchange="ouvrepage(this)">
<option selected="selected">...........Choisissez une rubrique...........</option>
</select>
</form>
</body>
</html> |
Partager