I just tried using this code to implement some java script to do a nice little mouse over effect. I have about 10 buttons, and as I mouse-over each button, I got it so that a different image would appear beautifully in the center of the page. I just have one problem. When the page loaded for the first time (using IE), all of the center images would appear briefly, layered one on top of the other, before the code:
onload="MM_showHideLayers('Image','','hide')
had a chance to execute for each image. I ended up with the image I wanted on the screen, but having all 10 images load and then disappear is something I want to avoid.
To resolve this, I tried writing a function that would specifically hide each image, and just show the one image I want at page load. Now, however, I'm getting no center image at all on page load. I'm a bit new to java script, so I'm hopeful that I just have a very minor error. Can you help?
To summarize, I just want to ensure that only one center image will appear at the time of the initial page load, and the images that correspond to each button will only be seen when the mouse is moved over the correct button.
to see the entire source, visit I put what I think are the relvant bits below:
function LL_pageLoad() {
MM_showHideLayers('Image','','hide');
MM_showHideLayers('Image2','','hide');
MM_showHideLayers('Image3','','hide');
MM_showHideLayers('Image4','','hide');
MM_showHideLayers('Image5','','hide');
MM_showHideLayers('Image6','','hide');
MM_showHideLayers('Image7','','hide');
MM_showHideLayers('Image8','','hide');
MM_showHideLayers('Image9','','hide');
MM_showHideLayers('Image10','','hide');
MM_showHideLayers('Image1','','show');
}
//-->
</script>
</head>
<body background="images/backgroundimage.jpg"
onLoad="LL_pageLoad" link="#3A0B1B" alink="#C0C0C0" >
.
.
.
<div id="Image" style="position:absolute; left:300px; top:200px; width:255px; height:206px; z-index:1">
<img src="images/musicintheparktext.jpg" width="263" height="212" onload="MM_showHideLayers('Image','','hide')" > </div>
.
.
.
<a href="concert.htm">
<img border="0" src="images/button_concertschedule.jpg" name="Button1" width="166" height="26" id="Button1" onLoad="MM_showHideLayers('Image','','hide')" onMouseOver="LL_swapImage('Image', 'Image1')" onMouseOut="LL_swapImage('Image1', 'Image')" >
</a>
Thanks in advance for any help you are able to give,
nowickil
onload="MM_showHideLayers('Image','','hide')
had a chance to execute for each image. I ended up with the image I wanted on the screen, but having all 10 images load and then disappear is something I want to avoid.
To resolve this, I tried writing a function that would specifically hide each image, and just show the one image I want at page load. Now, however, I'm getting no center image at all on page load. I'm a bit new to java script, so I'm hopeful that I just have a very minor error. Can you help?
To summarize, I just want to ensure that only one center image will appear at the time of the initial page load, and the images that correspond to each button will only be seen when the mouse is moved over the correct button.
to see the entire source, visit I put what I think are the relvant bits below:
function LL_pageLoad() {
MM_showHideLayers('Image','','hide');
MM_showHideLayers('Image2','','hide');
MM_showHideLayers('Image3','','hide');
MM_showHideLayers('Image4','','hide');
MM_showHideLayers('Image5','','hide');
MM_showHideLayers('Image6','','hide');
MM_showHideLayers('Image7','','hide');
MM_showHideLayers('Image8','','hide');
MM_showHideLayers('Image9','','hide');
MM_showHideLayers('Image10','','hide');
MM_showHideLayers('Image1','','show');
}
//-->
</script>
</head>
<body background="images/backgroundimage.jpg"
onLoad="LL_pageLoad" link="#3A0B1B" alink="#C0C0C0" >
.
.
.
<div id="Image" style="position:absolute; left:300px; top:200px; width:255px; height:206px; z-index:1">
<img src="images/musicintheparktext.jpg" width="263" height="212" onload="MM_showHideLayers('Image','','hide')" > </div>
.
.
.
<a href="concert.htm">
<img border="0" src="images/button_concertschedule.jpg" name="Button1" width="166" height="26" id="Button1" onLoad="MM_showHideLayers('Image','','hide')" onMouseOver="LL_swapImage('Image', 'Image1')" onMouseOut="LL_swapImage('Image1', 'Image')" >
</a>
Thanks in advance for any help you are able to give,
nowickil