HTML Mouseover Puzzle

Discussion in 'HTML & Website Design' started by Hontoir, Mar 11, 2008.

  1. #1
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    	<title>Untitled</title>
    </head>
    
    <body>
    
    <IMG NAME="banner" SRC="car.gif" WIDTH=800 HEIGHT=600 BORDER=0 ALT="" USEMAP="bannermap">
    
    
    <MAP NAME="bannermap">
    <AREA SHAPE="rect" ALT="" COORDS="0,0 600,600"
    	HREF="next.html"
    	ALT=""
    	ONMOUSEOVER="changeImages('banner', 'car(1).gif'); return true;"
    	ONMOUSEOUT="changeImages('banner', 'car.gif'); return true;">
    </MAP>
    
    </body>
    </html>
    
    HTML:
    Can anyone figure out why the above doesn't work.

    When mouseover the second image is not displayed.

    Thanks

    Mike.
     
    Hontoir, Mar 11, 2008 IP
  2. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's lacking a changeImages() function, your onmouseover and onmouseout will do nothing.
     
    Dondon2d, Mar 11, 2008 IP
  3. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #3
    You need to make a javascript function to change the images. A pretty simple script.
     
    twistedspikes, Mar 11, 2008 IP
  4. TechnoGeek

    TechnoGeek Peon

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There should be a JavsScript function in the HEAD section to be called when the mouse passes over the image. Without that function changing the picture the mouseover won't work.
     
    TechnoGeek, Mar 11, 2008 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Wait, does this only show another image on :hover or can users click and drag (the title of the thread does say "puzzle")? If it's ONLY showing a different image on mouseover, there's no need for Javascript at all.

    What's this thing supposed to do? (link to similar site would be nice).
     
    Stomme poes, Mar 12, 2008 IP