Hello Everyone,
I have two functions:
I have a text field which is in the content div:
I enter some text(bla) into txtCustomer and do an Ajax request. The response calls purgeContent() and fills the content with some other stuff and a textfield txtCustomer. I type another word in the textfield(test) . When I now look at the value of txtCustomer through document.getEle mentById("txtCu stomer").value it says that the value is still the old one(bla) :S. It appears that the first textfield is somehow not entirely destroyed. How do I fully destroy it?
Kind Regards,
Vincent
I have two functions:
Code:
function purgeNode(node){
while(node.childNodes.length > 0){
var childNode = node.firstChild;
if(childNode.childNodes.length > 0)
purgeNode(childNode);
node.removeChild(childNode);
childNode = null;
delete childNode;
}
node.parentNode.removeChild(node);
node = null;
delete node;
}
function purgeContent(){
var content = getObj("content");
purgeNode(content);
}
Code:
<input type="text" id="txtCustomer" />
Kind Regards,
Vincent
Comment