Javascript people.. Have a question

Discussion in 'OT Technology' started by Rick, Apr 17, 2004.

  1. Rick

    Rick New Member

    Joined:
    Feb 20, 2002
    Messages:
    1,735
    Likes Received:
    0
    Location:
    Henderson, NV
    Here is my site: www.rickfriele.com
    I have it so when you hover over my menu at the top, an image appears under the title on the left describing what is at that particular page and I also have it so it changes to a blue version of text. I am using Dreamweaver MX and have the onMouseOver event to change both pictures, but it only lets me have one onMouseOut event. The pictures are supposed to go back to the black text when the mouse isn't over them. The part of the left is working ok.
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    a) Why not use text links instead of image links? With CSS you can have them look and act the same, but not have to do mouseovers for the color change.
    b) If you still want to use images, you can write a javascript procedure that will change both back and then use that in the mouseout.
     
  3. Rick

    Rick New Member

    Joined:
    Feb 20, 2002
    Messages:
    1,735
    Likes Received:
    0
    Location:
    Henderson, NV
    I use images because it's easier to space everything out. Can you look at my source and tell me what I need to add to make the menu change back to the black version?
     
  4. elcano

    elcano Guest

    You can do this using CSS, but if you want the anti-aliased text then you can keep the images. The reason it isn't working isn't clear as I can't be bothered deciphering the overly unformatted MM javascript. But I will say the easiest way to fix this problem is to append the MM_swapImage function to the onmouseout action on each of the menu images using the original image as the second argument instead of the _hover image. I have highlighted the change in bold.
    So...
    becomes
    Good luck!
     

Share This Page