SyntaxFix
Write A Post
Hire A Developer
Questions
removeChild should be invoked on the parent, i.e.:
removeChild
parent.removeChild(child);
In your example, you should be doing something like:
if (frameid) { frameid.parentNode.removeChild(frameid); }