No replies
Jeroen
Offline
newbie
Greece
Last seen: 12 years 8 weeks ago
Greece
Timezone: GMT+3
Joined: 2009-07-30
Posts: 1
Points: 0

Hi,

This my first post! I am not really good in html, css or javascript, but I am learning every day Smile With this problem however I am stuck...

I was looking for a way to prevent visitors to click on a thumb before the page was fully loaded, so the greybox script had time to load. I found a nice solution with a

showing as long as the page is loading. http://www.ella-zakynthos.nl/EN/gallery_outside.html is an example.

It works fine in all the browser I tested it with, except (surprise!) IE. I looked around on this (and other) forums but cannot find a solution, so I hope there is someone out here who can help me.

Because it is difficult for me to explain in words, and almost impossible to see with a fast internet connection, I have attached some screen dumps to show what is happening.

1.jpg shows the page loading as in Safari, FF, etc.; 2.jpg the same page after loading; 3.jpg the page loading in IE7.

Here is what I did:

<div id="loading" class="loading-invisible">
    <p>&nbsp;</p>
    One moment please...<br>the pictures are loading
    <p>&nbsp;</p>
    <img src="../afbeeldingen/ajax-loader-4.gif" alt="" style="width: 54px; height: 55px;" /></p>
</div>
 
  document.getElementById("loading").className = "loading-visible";
  var hideDiv = function(){document.getElementById("loading").className = "loading-invisible";};
  var oldLoad = window.onload;
  var newLoad = oldLoad ? function(){hideDiv.call(this);oldLoad.call(this);} : hideDiv;
  window.onload = newLoad;

The CSS for this

is
div.loading-invisible{
    display:none;
}
 
div.loading-visible{
    display:block;
    position:absolute;
    top:63px;
    width:89%;
    min-height: 492px;
    height: auto !important;
    background:#fff;
    opacity:.85;
    font-weight: bold;
    text-align: center
}

Jeroen

Image Attachments

Click thumbnail to see full-size image

AttachmentSize
1.jpg120.41 KB
2.jpg137.91 KB
3.jpg47.57 KB