Hi there,
I have created a preload-javascript for my website (tolkienkun.de) that is supposed to load the navbar-images for fast access at mouseover/mouseout. My problem right now is: The script seems to be working, but in Netscape, I have to leave the site and go back with the back-button ("reload page" does work as well) to get it to work. that means, when I access the site by typing and slide over the buttons, they always get re-loaded, no cache-use it seems. after reloading the whole page, the thingy works as it should(no rectangles when I hover the buttons).
So, status is: the script doesn't work fine when the whole page is loaded for the first time. but as soon as it's in the browser cache, and I reload it, everything's ok...
any ideas what I did wrong?
My jscript:
<script language="JavaScript">
<!--
image_n = new Array(6); image_m = new Array(6);
for(i=0;i<=6;i++)
{
image_m=new Image(); image_n=new Image();
}
image_m[0].src='images/home_mover.gif';
image_m[1].src='images/bio_mover.gif';
image_m[2].src='images/lit_mover.gif';
image_m[3].src='images/tvkino_mover.gif';
image_m[4].src='images/dl_mover.gif';
image_m[5].src='images/bilder_mover.gif';
image_m[6].src='images/siteinf_mover.gif';
image_n[0].src='images/home_normal.gif';
image_n[1].src='images/bio_normal.gif';
image_n[2].src='images/lit_normal.gif';
image_n[3].src='images/tvkino_normal.gif';
image_n[4].src='images/dl_normal.gif';
image_n[5].src='images/bilder_normal.gif';
image_n[6].src='images/siteinf_normal.gif';
function showN
{document.images['n'+n].src = image_n[n].src;}
function showM
{document.images['n'+n].src = image_m[n].src;}
-->
</script>
and thats how my mouseover-events look like:
<a href="main.html" target=main onmouseover="showM(0);" onmouseout="showN(0);">
<img src="images/home_normal.gif" name="n0" border=0></a><br>
Thanks alot!
I have created a preload-javascript for my website (tolkienkun.de) that is supposed to load the navbar-images for fast access at mouseover/mouseout. My problem right now is: The script seems to be working, but in Netscape, I have to leave the site and go back with the back-button ("reload page" does work as well) to get it to work. that means, when I access the site by typing and slide over the buttons, they always get re-loaded, no cache-use it seems. after reloading the whole page, the thingy works as it should(no rectangles when I hover the buttons).
So, status is: the script doesn't work fine when the whole page is loaded for the first time. but as soon as it's in the browser cache, and I reload it, everything's ok...
any ideas what I did wrong?
My jscript:
<script language="JavaScript">
<!--
image_n = new Array(6); image_m = new Array(6);
for(i=0;i<=6;i++)
{
image_m=new Image(); image_n=new Image();
}
image_m[0].src='images/home_mover.gif';
image_m[1].src='images/bio_mover.gif';
image_m[2].src='images/lit_mover.gif';
image_m[3].src='images/tvkino_mover.gif';
image_m[4].src='images/dl_mover.gif';
image_m[5].src='images/bilder_mover.gif';
image_m[6].src='images/siteinf_mover.gif';
image_n[0].src='images/home_normal.gif';
image_n[1].src='images/bio_normal.gif';
image_n[2].src='images/lit_normal.gif';
image_n[3].src='images/tvkino_normal.gif';
image_n[4].src='images/dl_normal.gif';
image_n[5].src='images/bilder_normal.gif';
image_n[6].src='images/siteinf_normal.gif';
function showN
function showM
-->
</script>
and thats how my mouseover-events look like:
<a href="main.html" target=main onmouseover="showM(0);" onmouseout="showN(0);">
<img src="images/home_normal.gif" name="n0" border=0></a><br>
Thanks alot!