why this code is not working? can any one help me?
<select id="cboOptions" name="cbo0ptions" onChange="displayDiv(this.value)">
<option selected="selected" value="">choose</option>
<option value="1">Order 1</option>
<option value="2">Order 2</option>
<option value="3">Order 3</option>
<option value="4">Order 4</option>
</select>
<div id="1" style="display:none;">
<fieldset>
<legend>order line</legend>
<table>
<tr><td>Item ID</td><td><input type="text" readonly="" value="<? echo $c = uniqid(); ?>" /></td></tr>
<tr><td>Item Description</td><td><input type="text" /></td></tr>
<tr><td>Item quantity</td><td><input type="text" /></td></tr>
<tr><td>Item price</td><td><input type="text" /></td></tr>
</table>
</fieldset>
</div>
<div id="2" style="display:none"><fieldset>
<legend>order line</legend><table>
<tr><td>Item ID</td><td><input type="text" readonly="" value="<? echo $c = uniqid(); ?>" /></td></tr>
<tr><td>Item Description</td><td><input type="text" /></td></tr>
<tr><td>Item quantity</td><td><input type="text" /></td></tr>
<tr><td>Item price</td><td><input type="text" /></td></tr>
</table>
</fieldset>
</div>
<div id="3" style="display:none"><fieldset>
<legend>order line</legend><table>
<tr><td>Item ID</td><td><input type="text" readonly="" value="<? echo $c = uniqid(); ?>" /></td></tr>
<tr><td>Item Description</td><td><input type="text" /></td></tr>
<tr><td>Item quantity</td><td><input type="text" /></td></tr>
<tr><td>Item price</td><td><input type="text" /></td></tr>
</table>
</fieldset>
</div>
<div id="4" style="display:none"><fieldset>
<legend>order line</legend><table>
<tr><td>Item ID</td><td><input type="text" readonly="" value="<? echo $c = uniqid(); ?>" /></td></tr>
<tr><td>Item Description</td><td><input type="text" /></td></tr>
<tr><td>Item quantity</td><td><input type="text" /></td></tr>
<tr><td>Item price</td><td><input type="text" /></td></tr>
</table>
</fieldset>
</div>
<script type="text/javascript">
function displayDiv(id){
//var div = document.getElementById(id+sel.selectedIndex);
// if (div) div.style.display = 'block';
switch (id)
{
case 1:
// code to be executed if n=label1;
document.getElementById('id').style.display='block';
break;
case 2:
//code to be executed if n=label2;
document.getElementById('id').style.display='block';
break;
case 3:
//code to be executed if n=label2;
document.getElementById('id').style.display='block';
break;
case 4:
//code to be executed if n=label2;
document.getElementById('id').style.display='block';
break;
default:
//code to be executed if n is different from both label1 and label2;
document.getElementById('id').style.display='none';
}
}
</script>