Sunday, October 25, 2009

JWPlayer - swfobject and IE 7

Embedding Flash players in you website, is easy with the JWPLAYER module.

Jwplayer, (stand alone code as well as Joomla module) relies on swfobject.js. Although everything works fine with all browsers and O/S's, it seems to act up with IE7. For most no surprise of course, but since the majority of computers run on Windows, and use IE, we have to fix this.

The first time load seems to work, but a reload causes issues with the following Error:

Internet explorer cannot open the internet site http://www.your_domain.com/...
Operation aborted



Thanks to a blog post by Eoghan, O'brien, I'm able to write out the fix for this issue with the joomla module.


You have to edit the following file: ../modules/mod_jwmedia/mod_jwmedia.php

Scroll down to the following lines of code: (about line 50)


echo "<script type='text/javascript' src='" . $modurl . "swfobject.js'></script>";
echo "<script type='text/javascript'>;


Change to:



echo "<script type='text/javascript' src='" . $modurl . "swfobject.js'></script>";
echo "<script type='text/javascript' defer='defer'>";
















No comments:

Post a Comment

Please be courteous, even if you do not share the same view.