I want to remove the temporary element which is created dynamically.
x = document.createElement("DIV");
x.innerHTML = res;
y = x.parentNode;
x = y.removeChild(x);
x = null;
I've written those codes but since it does note have a parent, they dont work. I know i can create a second temp node to keep first one but then i need a third node to delete the second one.... :) Here i need a function to delete the node without needing a parent node. I also think that i can put the node to directly to document object and delete it, but i'm looking for more efficient solutions if exists.