PDA

View Full Version : Images not showing in IE - Javascript co***ict?



Jo6891
26 May 2009, 06:28 AM
Hi There

I hope someone can help me.

I am having trouble with a portfolio page on a website I am building - but only in IE. Let me explain the structure of the page:

The page contains a javascript menu (transmenu - http://youngpup.net/projects/transmenus/transmenu.js ), swfobject and the following:

<script type="text/javascript" language="JavaScript"><!--
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
//--></script>

The above code gives me the functionality of a gallery area where by the user can click on a thumbnail and it shows the div which the thumbnail is linked to and hides the others.

The problem I am having is only in IE6 and possibly IE7, no problem in Firefox. When you visit the page and click around the gallery, some of the images do not load and you have to right click > show picture to see the image. This malfunction also disables my transmenu from working. The flash continues to work fine.

If i have done 'show picture' on all the images which are not visible, visited a different page, then returned to the original problem page, everything seems fine.

I originally thought this could have been a file size issue, however I have reduced the images file sizes and still no joy.

Has anyone else come across this problem? Could it maybe be a javascript co***ict?

Thanks in advance!

omnicity
04 Jun 2009, 09:06 AM
I can't see anything in that script that would cancel an image download, but anything is possible.

You don't mention where these images are located - are they on a fast local server, or on a slow remote one? If the latter, then it is possible that it is just because IE is giving up because it thinks things have taken too long. If so, try linking to images on your local machine, just to confirm that they show up okay then.