i am trying to deleter child i in a drop down menu
the line marked in (***)! it wont let me!why?what can i do so i can delete a child and get a new drop down withought child i?
this is the code:
<html>
<head>
<title>Untitled</title>
</head>
<script languge="javascript">
function deleteItem(obj){
with(obj){
alert(obj);
alert (obj.selectedIndex);
removeChild(obj.options[obj.selectdIndex]) //***
}
}
</script>
<body>
<form>
<select id="ddb1" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<INPUT type="button" value=http://www.webdeveloper.com/forum/archive/index.php/"Delete Value" id=button1 name=button1 onclick ="
deleteItem(ddb1)">
</form>
</body>
</html>
thanks in advance
Peleg
the line marked in (***)! it wont let me!why?what can i do so i can delete a child and get a new drop down withought child i?
this is the code:
<html>
<head>
<title>Untitled</title>
</head>
<script languge="javascript">
function deleteItem(obj){
with(obj){
alert(obj);
alert (obj.selectedIndex);
removeChild(obj.options[obj.selectdIndex]) //***
}
}
</script>
<body>
<form>
<select id="ddb1" >
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<INPUT type="button" value=http://www.webdeveloper.com/forum/archive/index.php/"Delete Value" id=button1 name=button1 onclick ="
deleteItem(ddb1)">
</form>
</body>
</html>
thanks in advance
Peleg