View Full Version : removing elements

12-09-2011, 02:46 PM
I put this at the end of my code thinking that after the div displays (id = 'link_container') I can eliminate (id = 'link_container') from memory when the script ends so there's a place for another div (id = 'link_container') when/if there's onkeyup event.

Wouldn't this little script remove any element with an id = 'link_container' ?

<script type="text/javascript">
var deleteDiv = document.getElementById('link_container');

Logic Ali
12-09-2011, 04:07 PM
deleteDiv.parentNode.removeChild( deleteDiv );