IE Shadowbox Not Working At All

15 messages Options
Embed this post
Permalink
James

IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Got Shadowbox installed, and it works fine in Firefox & Safari, but does nothing in IE8.  I don't have access to IE6 or 7 so I can't say it's and IE8 issue, but even running in compatibility mode it makes no difference.  The images just open in a new blank window without any javascript.

I get an 'Invalid Argument' and it references the follow argument from shadowbox.js

Line 1885
            sb.style.height = h + 'px';

Any ideas?
cthulhu

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
I ran into this today and figured out something I had done in the shadowbox.css file was causing it.
Rather than debug (which can take a long time), I simply started replacing my modified files with ones from the distribution to see if I'd get lucky, and I did.

I never bothered to go in my modified shadowbox.css file to see exactly which rule was upsetting shadowbox.js, but now that I am comparing the files side by side I'm sure I'll find it.
If I discover it I'll post, but if you're still stumped on this try replacing your shadowbox.css with the one from the download - if it starts working in IE again, at least you know where to start looking for the problem.

P.S. Thank you Michael for this package, great work and really happy to see it maturing!
James

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
In reply to this post by James
Yea, I checked that.  I don't remember modifying any files, but I started from scratch anyway.  Still get the same error in IE.

I made sure I have the following in the head as recommended elsewhere on the site.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

I also have the following in the header to call the shadowbox files.

<link rel="stylesheet" type="text/css" href="includes/js/shadowbox/shadowbox.css">
<script type="text/javascript" src="includes/js/shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init();
</script>

The test image I am trying to load is quite simple.

My Image

When attempting to load in IE8 it asks to debug, I click yes, and it highlights the following in shadowbox.js

y.style.height=u+"px"

I am running a fully updated version of Windows 7 RC1 64 bit w/ IE8.  I also tried it in XP 64 bit and Vista 32 bit and get the same issue.

I love the potential of this add-on, and would love to get it up and running.  If I can get it going I will be buying a few commercial licenses for various sites.
James

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Sorry, test image should appear as below (without the preceding "-")

<-a href="images/back1.jpg" rel="shadowbox">My Image<-/a>
cthulhu

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
In reply to this post by James
Maybe I misunderstood what you're describing, but it's incorrect to nest the DOCTYPE in the HEAD tag. DOCTYPE should be the first declaration in an HTML or XHTML page - as in *before* or *in front of* the HEAD tag.

Also, I doubt setting anything to a transitional or "loose" (quirks mode) DTD is going to make anything improve.

Stick with strict HTML or XHTML to level the playing field for yourself, many web developers will agree with me when I tell you that if you have to use quirks mode to do something, whatever you're trying to do is being approached wrongly and should be reexamined.
James

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Sorry...I misspoke.  The doc type is listed as follows in each page.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

Having the doc type listed as loose in this case wouldn't case the error I am getting, would it?
cthulhu

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
I honestly don't think so, but again you should consider leveling the playing field as much as possible since it's one type of browser (IE) that's giving you issues.
James

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Just tried switching the doc type to strict, and no change :(

Any other ideas?  Thanks for your help.
James

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Ok I found it.  It happened to be a conflict with another script on the site...I stripped off everything then added each back one by one to find the conflict.

Thanks for the effort. :)
cthulhu

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Great job!! That method of troubleshooting works quite well.

It figures, I assumed you already went that route - that's what I get for assuming!
David

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
In reply to this post by James
HELP!!! I am having the same problem with IE! I'm using IE6, and my pop-up shows as an entire page. I suspect (fairly confidently) that this is happening in all of the IE's.

All pop-ups are working perfectly in Firefox 3.5.4 (of course), and my XHTML is validating just fine.

The thing is, though, that I only have like three scripts running on the site, and two of them are for Shadowbox (shadowbox.css and shadowbox.js).

The website is HERE

The pop-ups reside in step 1 and step 2.

Any and all help would be GREATLY appreciated!!!

Thanks,

DG
Wizzud

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Remove the comment from the top of your page!
Combine literacy with curiosity and a whole world of information opens up to you
David

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
??? Please elaborate for the html impaired.

Thanks!

DG
Wizzud

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Doc type should be the first non-blank line on the page.
You have a comment at the top of your page.
That comment forces IE into quirks mode.
Shadowbox is only guaranteed to work in standards mode.
Remove that comment.

Okay?
Combine literacy with curiosity and a whole world of information opens up to you
David

Re: IE Shadowbox Not Working At All

Reply Threaded More More options
Print post
Permalink
Wizzud, you are a true Wizzud! Some day, the teacher will become the student... but not today!

As always, thank you for your help!!! Hopefully we will never have to speak about these things again.

But, realistically, I'll talk to you soon! Until then, have a GREAT day!!!

DG