[SWFObject] How do I dynamically remove swfobject using javascript

John Giotta jdgiotta at gmail.com
Thu Sep 7 10:13:36 PDT 2006


I suggest doing a DOMElement.replaceChild.

// Somthing like
function removeSWFobject() {
    var newdiv = document.createElement("div");
    newdiv.innerHTML = "Hello World!";
    var flashdiv = document.getElementById("mySWFobjectDIVcontainer");
    document.body.replaceChild(newdiv, flashdiv);
}

Of course it does not destroy the SWFObject declared in JavaScript memory,
it only removes the HTML rendered output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060907/f45485c4/attachment-0005.htm>


More information about the Swfobject mailing list