proplem in delete child from div...?
Posted: Tue Dec 29, 2009 7:37 am
hi all,
i have
which suppose to make textbox and beside it a href "Remove" ...the problem is when i click Remove it didnot remove the textbox...i donot know why..?
here is the function deleteNear()
i have
Code: Select all
<td><div id="newdiv"></div></td>
<?for($i=0;$i<count($exploded_location);$i++){?>
<tr><td><input type="text" name="featurevalue<?echo ($i*2)+10;?>" value="<?echo $exploded_location[$i];?>" ></td>
<td><a href="javascript:deleteNear(featurevalue<?echo ($i*2)+10;?>)" >Remove</a></td>
</tr>
<?}?> here is the function deleteNear()
Code: Select all
function deleteNear(divID)
{
var ni = document.getElementById('newdiv');
ni.removeChild(divID);
}