Conflict of javascript files throwing Internet Explorer into a spin
-
Hi,
Posting here as I’m hoping someone will be able to help me with this js conflict.
I have hard-coded a JWplayer video to open in a JWbox lightbox on four pages of a WordPress site. On these pages, there is an error warning showing in Internet Explorer that says there is a conflict with another script loaded by a plugin – Mtouch-quiz – and IE hangs the page so the user can’t get to watch the video in the lightbox.
—————
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 3.0.04506; Media Center PC 5.0; SLCC1; .NET4.0C)
Timestamp: Mon, 21 Mar 2011 17:42:23 UTCMessage: Object doesn’t support this property or method
Line: 108
Char: 3
Code: 0
URI: https://www.mysite.com/wp-content/plugins/mtouch-quiz/script.js?ver=2.2.2
————————-Again, I’ve hard-coded the Lightbox js files to appear in the header of just those four pages, so I added this in the header.php of the WP theme:
<?php wp_head(); ?>
<?php 3
if (is_page(array(‘page1’, ‘page2’, ‘page3’, ‘page4’))) {echo ‘<script type=”text/javascript” src=”https://www.mysite.com/jwplayer/jwbox/jquery.js”></script>’;
echo ‘<script type=”text/javascript” src=”https://www.mysite.com/jwplayer/jwbox/jquery.jwbox.js”></script>’;
echo ‘<link rel=”stylesheet” type=”text/css” href=”https://www.mysite.com/jwplayer/jwbox/jwbox.css” />’;
}?>
This puts the JWBox links to the js files below those of the Mtouch-quiz plugin, which appears higher up in header and looks like this
<script type=’text/javascript’ src=’https://www.mysite.com/wp-content/plugins/mtouch-quiz/script.js?ver=2.2.2′></script>
<script type=’text/javascript’ src=’https://www.mysite.com/wp-content/plugins/mtouch-quiz/scrollable.min.js?ver=2.2.2′></script>Is there anyway to get the JWbox scripts to play nice with the mtouch-quiz plugin?
The other way would be to strip out the function that adds the js links to the header in the Mtouch-quiz files, and hard-code them in to just appear on the pages where the Mtouch quiz is needed. The quiz is not actually used on the pages where the js conflict is happening with the lightbox, so removing the mtouch js links from those pages will solve my issue.
I just don’t know where to find that function within the Mtouch-quiz plugin files.
I need to get this fixed ASAP, as the site is due to launch next Monday.
I can’t really post a link to the site as it’s not public yet, but if you PM me or contact me at cyberguin/@/yahoo.co.uk I can send you a link.
Cheers,
Tracy
- The topic ‘Conflict of javascript files throwing Internet Explorer into a spin’ is closed to new replies.