rollover buttons

clang232clang232 BeginnerLink Clerk
<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?

Comments

  • FelixFelix Junior Member Shared Hoster
    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.
  • clang232clang232 Beginner Link Clerk
    Ya I've checked multiple times.
  • danielneridanielneri WP V.I.P. VPS - Virtual Prince of the Server
    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
    ban1.gif
  • clang232clang232 Beginner Link Clerk
    DAmn, I didn't notice that now I feel stupid... >.>
  • clang232clang232 Beginner Link Clerk
    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.
  • danielneridanielneri WP V.I.P. VPS - Virtual Prince of the Server
    so i was right about something for once? cool!
    ban1.gif
Sign In or Register to comment.