objDiv = document.getElementById("bannerCode"); //this will return the "object" of the div tag containing the flash code objDiv = arrTagObject = objDiv.getElementsByTagName("object"); //gives array of all the object tag inside the "bannerCode" div which containing the flash code for(i=0 ; i
Firefox nor in IE6 (Internet Explorer 6). Even I checked in FireBug (the FireFox plugin to see the DOM-Document Object Model). In firebug all the attributes like height width and src of embed, all were set to new value but still the old Flash (swf) movie was displayed. Changing the src (source) attribute of the embed tag won’t render the new flash (swf) movie. You need to put the div tag around your flash object or embed code and do replace the innerHTML of the div tag using the document.getElementById("divTagId").innerHTML = new_flash_code. Following code works for me.
str1 =str1 += "\" height=\"" + new_height;
str1 += "\"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"
document.getElementById("bannerCode").innerHTML = str1;