XHTML fait planter mon menu déroulant
Bonjour à vous,
Alors voila mon problème, du a une colorbox j'ai du rajouter les lignes suivante à mon code pour qu'elle fonctionne correctement:
Code:
1 2 3
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> |
Sauf qu'après cela mon menu déroulant devient vide. J'ai fait une petit exemple:
Code:
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script Language="javascript">
Level1 = new Array("Pièce de théatre","Chemicals","concert","improvisation");
Ceramics = new Array("ELECTRONICS","ENVIRONMENTAL");
Chemicals = new Array("METALLIC SOAPS","OLEOCHEMICAL_DERIVATIVES");
ELECTRONICS = new Array("Solder mask");
ENVIRONMENTAL = new Array("Catalysts")
METALLICSOAPS = new Array("Soap","Translucent soaps","Liquid soap");
OLEOCHEMICAL_DERIVATIVES = new Array("FA-pos","FA polfaideriv");
function fillSelect(isValue,isNext){
isNext.style.display = "";
isNext.length = 1;
var curr = window[isValue.replace(/\s/g,'')];
for (var zxc0=0;zxc0<curr.length;zxc0++) {
isNext.options[zxc0+1]= new Option(curr[zxc0],curr[zxc0],true,true)
}
isNext.selectedIndex=0;
}
function getValue(isValue){
}
</script>
</Head>
<body>
<center>
<h4>Dependent Select List, within a form</h4>
<Form name='Categories'>
<p>Industry segment <Select name='List1' onChange="fillSelect(this.value,Categories.List2)">
<option selected>Make a selection</option>
</Select>
</p>
<Select name='List2' onChange="fillSelect(this.value,Categories.List3)">
<option selected>Make a selection</option>
</Select>
<p></p>
<Select name='List3' onChange="getValue(this.value)">
<option selected >Make a selection</option>
</Select>
</Form>
</center>
<script>
fillSelect('Level1',Categories.List1);
Categories.List2.style.display = "none";
Categories.List3.style.display = "none";
</script>
</body>
</html> |
Et je ne comprend pas du tout ou est l'erreur =/