Hello all. I am using the following code in a part of my script. It is supposed to take reponseText, which is an integer, and remove that div from a set of divs.
The parent div is books and the child is the ID of the book, an integer.
Here is the JS code:
var toRemove = document.getElementById('books');
var toDelete = request.responseText;
toRemove.removeChild(toRemove.toDelete);
Is produces this error:
Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.removeChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://www.asd.us/asd/asd.php :: showResult :: line 30" data: no]
Source File: http://www.asd.us/asd/asd.php
Line: 30
Any help would be appreciated.