PDA

View Full Version : rollover buttons



clang232
12-03-2005, 05:30 PM
<p class="ex4">
<a href="home.html"><img ID=home2 src="Images\home..png"
onmouseover='document.getElementById("home2").src="Images\home.2.png"'
onmouseout='document.getElementById("home2").src="Images\home..png"' border="0" alt="Home"></a><br />
<a href="about.html"><img ID=about2 src="Images\about.png"
onmouseover='document.getElementById("/Images/about2").src="/Images/about2.png"'
onmouseout='document.getElementById("/Images/about2").src="/Images/about.png"' border="0" alt="About Us"></a><br />
<a href="eye.html"><img ID=eyew2 src="Images\eyew.png"
onmouseover='document.getElementById("eyew2").src="Images\eyew2.png"'
onmouseout='document.getElementById("eyew2").src="Images\eyew.png"' border="0" alt="Home"></a><br />
<a href="contact.html"><img ID=contact2 src="Images\contact.png"
onmouseover='document.getElementById("contact2").src="Images\contact2.png"'
onmouseout='document.getElementById("contact2").src="Images\contact.png"' border="0" alt="Contact Lenses"></a><br />
<a href="us.html"><img ID=us2 src="Images\us.png"
onmouseover='document.getElementById("us2").src="Images\us2.png"'
onmouseout='document.getElementById("us2").src="Images\us.png"' border="0" alt="Contact Us"></a><br />
</p>

What I'm trying to do is when you roll the mouse over the image it changes. It worked before I added on the "Images\" and why I added that on is because I wanted everything to be organized into separate folders. Now the images wont change anymore, infact when you roll the mouse over the images they disapear and you are left with the little box that shows when there is no image. Can anyone find the problem?

Felix
12-03-2005, 06:43 PM
The reason any image won't show up is because it can't be found. Are you sure that the correct path to the images is "Images"? Don't forget that its case-sensitive so make sure to check its not spelt "images" or something similar instead.

clang232
12-05-2005, 04:49 PM
Ya I've checked multiple times.

danielneri
12-06-2005, 07:03 PM
think cuz some of ur slashes are backward and some forward

\images
/images

watch for that...not that i know a THING about js lol

clang232
12-10-2005, 05:30 PM
DAmn, I didn't notice that now I feel stupid... >.>

clang232
12-10-2005, 05:51 PM
Alright, I just fixed it. The problem was that I changed the ID's wich is what made the images not appear.



<a href="home.html"><img ID=home2 src="Images/home..png"
onmouseover='document.getElementById("home2").src="Images/home.2.png"'
onmouseout='document.getElementById("home2").src="Images/home..png"' border="0" alt="Home"></a>


That's the correct way to do it if any one cares, or may want to use it as an example or something like that.

Thanks for the help.

danielneri
12-10-2005, 06:05 PM
so i was right about something for once? cool!