I too am getting IE8 users complaining that all my shadowboxen fail miserably. Now that IE8 is released, and Windows Update has begun pushing people hard to upgrade to it (calling it an "important security update" and installing it automatically if users are using the "recommended" update settings) more and more of the public are switching to it and I find I have to deal with it.

My error can be seen here: http://muslimvoicesfestival.org/ (or on any page on the site with a shadowbox, which is any event or artist page) and only occurs in IE8, whether we use "compatibility" mode or not.

I googled shadowbox and IE8:
http://google.com/search?q=shadowbox+ie8

And learned that it is of course a browser compatibility issue in IE8, but it has been fixed in JQuery 1.3.2, but the JQuery Update module only offers us poor D5 users JQuery 1.2.6 :-(

What now? It doesn't look like Jquery Update will be offering a JQuery 1.3.2 upgrade for D5 anytime soon... can this be worked-around in in Shadowbox?

--

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322)
Timestamp: Mon, 18 May 2009 12:11:39 UTC

Message: Invalid argument.
Line: 1
Char: 255
Code: 0
URI: http://muslimvoicesfestival.asiasociety.org/sites/all/modules/shadowbox/...

Comments

davidkaufman’s picture

Title: Shadowboxes don't work in IE8 » Shadowboxes don't work in IE8 (on D5)
davidkaufman’s picture

Status: Active » Closed (fixed)

I found my own workaround.

Turns out it *does* work using IE8's "compatibility" mode, you just have to put the meta tag (below) *above* all of the <link> and <script> tags in the head section of the page.

<meta http-equiv="X-UA-Compatible" content="IE=7" />

I had put the tag below print $head which emitted some JS script tags beofore my meta tag, which locked the browser into "IE8" mode for all the JS.

jeremyr’s picture

if anyone is interested I added a conditional statement to my theme file that will detect if you are using IE8 or not. See code below...

<?php if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
	if (ereg('MSIE 8',$_SERVER['HTTP_USER_AGENT'])) {
 ?>
  <meta http-equiv="X-UA-Compatible" content="IE=7" />
  <?php
   }
}
?>

Place this above the section shown below in your page.tpl.php file.

  <?php print $head; ?>
  <?php print $styles; ?>
  <?php print $scripts; ?>
lektum’s picture

Perfect. Thanks !

aacraig’s picture

Have a look here for an easier fix. As it turns out, it's just a matter of adding two css statements:

http://www.iandevlin.net/blog/2009/10/webdev/shadowbox-and-internet-expl...

jteague’s picture

While this issue is closed, I thought it might be good to share one additional reason why Shadowbox (this also occurs with Lightbox2) may fail to function properly in IE8. If you are loading shadowbox using IFRAME method, you could experience the following symptoms in Drupal 6:

  • The shadowbox launches normally and without error in FF3 and Safari
  • The shadowbox launches normally, but the page is not displayed at all in IE8, and errors are not reported
  • The doctype for the page you are loading into shadowbox meets the requirement for shadowbox

If this is the case, I strongly recommend that you look closely at the stylesheets that are being loaded into the page you are attempting to load into your shadowbox. Remember, the page itself loads, but is not visible in IE8. In my case, the problem was a conflicting html and body styles in my local theme css file. However, the conflict could also occur with css loaded from modules, etc. You may need to temporarily disable print $local_styles; and then start adding stylesheets back into your page template file manually to identify the culprit. Alas, not all issues are that easy to diagnose.