Reputation:
I have a problem with JavaScript code. I copied the code for the "light box" (just without the black background) off the internet. It works in Firefox, Safari but it does not work in IE for some reason.
You can see this problem on my portfolio website on the second page at svetlana-konetskaia.com/final. Can you suggest anything?
Upvotes: 2
Views: 1231
Reputation: 35790
When I try to use your lightbox I get an error related to a standardbody variable not existing. This is in an IE-specific block of code, but I wasn't clear whether you wrote the code or whether it was part of the lightbox code you copied.
Either way, you need to figure out why your code expects that variable to be there (and more importantly, why it isn't there) if you want to make your lightbox work.
Upvotes: 0
Reputation: 93
If you are looking to have the lightwindow effect, just without the blackout... why not use something like lightwindow, which will allow you to show nearly any media type.
http://www.stickmanlabs.com/lightwindow/
Upvotes: 0
Reputation: 1063
IE is finicky when it comes to links with both an href and an onclick. The return false; is not enough to override the default action of the link, which is to navigate away from the page.
Add
event.returnValue = false;
to each of your links before the return false; in the onclick function.
Like this:
<div id="picture_1"><a href="images/surrealists_large.png" onClick="dv.showDV(surrealists); event.returnValue = false; return false"><img src="images/surrealists_small.png" /></a></div>
Upvotes: 1