A
agatha.life
I did a javascript for the loading of images (I didn't want to have
the images loaded in "on loading" because they are too many).
The website is for a model and if you look at the codeof pages ( for
ex. http://www.agathamoon.com/gallery_48_eng.htm ) using explorer or
firefox it works, with safari it doesn't!
The idea is to have the word "loading" appearing while going from an
image to another.
Here it's what there's in the head:
<script>
function imgLoad(myImg)
{
showLoading();
newImage = new Image();
newImage.src = myImg;
document.images['image_big_on'].src=myImg;
if (newImage.complete )
showImage();
else
newImage.onload=showImage;
}
function showLoading()
{
document.images['image_big_on'].style.display='none';
document.all.warning.style.display='inline ';
}
function showImage()
{
document.all.warning.style.display='none';
document.images['image_big_on'].style.display='inline';
}
//-->
</script>
Here how the script appears durind the loading in the body:
<td align="center"><SPAN class="index" id=warning style="DISPLAY:
none">Loading image...</span><img src="img/gallery/a_o/cover.jpg"
name="image_big_on" border="0" id="image_big_on"></td>
and here I recall the javascript in the body:
<A href="javascript:imgLoad('img/gallery/a_o/01.jpg');"><img
src="img/gallery/a_o/01_thumb.jpg" width="40" height="40"
border="0"></a>
Do you know what's wrong with the process?
Being the site of a model it's visited by lots of photographers, a big
part of them uses a mac and safari.
I thank you very much for your help.
AM
www.agathamoon.com
the images loaded in "on loading" because they are too many).
The website is for a model and if you look at the codeof pages ( for
ex. http://www.agathamoon.com/gallery_48_eng.htm ) using explorer or
firefox it works, with safari it doesn't!
The idea is to have the word "loading" appearing while going from an
image to another.
Here it's what there's in the head:
<script>
function imgLoad(myImg)
{
showLoading();
newImage = new Image();
newImage.src = myImg;
document.images['image_big_on'].src=myImg;
if (newImage.complete )
showImage();
else
newImage.onload=showImage;
}
function showLoading()
{
document.images['image_big_on'].style.display='none';
document.all.warning.style.display='inline ';
}
function showImage()
{
document.all.warning.style.display='none';
document.images['image_big_on'].style.display='inline';
}
//-->
</script>
Here how the script appears durind the loading in the body:
<td align="center"><SPAN class="index" id=warning style="DISPLAY:
none">Loading image...</span><img src="img/gallery/a_o/cover.jpg"
name="image_big_on" border="0" id="image_big_on"></td>
and here I recall the javascript in the body:
<A href="javascript:imgLoad('img/gallery/a_o/01.jpg');"><img
src="img/gallery/a_o/01_thumb.jpg" width="40" height="40"
border="0"></a>
Do you know what's wrong with the process?
Being the site of a model it's visited by lots of photographers, a big
part of them uses a mac and safari.
I thank you very much for your help.
AM
www.agathamoon.com