I got an object tag (generated by SWFObject) which I’ld like to modify width and height properties on window resize with mootools library.
With a :
$(‘my_object’).set({ ‘width’: new_width, ‘height’: new_height });
everything working fine in a firefox, chrome and others.
Unfortunately, Internet explorer (7 & 8) don’t see it the same. It gives me an error saying “Object does not support this property or method”.
Does anyone know why this problem or how to avoid it ?
Thanks to all.
whereas you may not apply mootools methods to activex objects or elements in IE as they are not extended, you may be able to do something else instead.
create a wrapper element, like around the embedded object. set the width and height of that via CSS and then set width and height of the object/element to 100% so it follows the parent wrapper. then apply the resizing to the wrapper and the object will follow.
here’s a quick example i tried that works in ie8:
http://www.jsfiddle.net/dimitar/V5mQr/6/
good luck.