SWFobject Internet Explorer error fix.
People who use SWFobject and Mootools at the same time, get problems in Internet Explorer. A solution that works for some people is adding the defer="defer" tag to the SWFobject javascript. But depending on the (load)order of the linked javascripts, the error occures still somtimes, so that's a buggy fix.
The solution is to place te SWFobject javascript into a domready (or load) event, so it will be compatible with other mootools functions and scripts (eg when you use Slimbox or Mediabox)
The fix:
<script type="text/javascript">
window.addEvent('domready', function(){
var so = new SWFObject("movie.swf","mymovie","400","200","8", "#336699");
so.write("flashcontent");
});
</script>
INSTEAD OF
<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
so.write("flashcontent");
</script>
reageer
Reageren gesloten voor dit artikel
Works for me! Thanx
— Tom · dec 6, 15:34 · #