SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Swapping Image When Clicked and Changed Only If Another Link Clicked

    Hi,
    Is it possible to have an image change when clicked and only have it change back if another link image is clicked? For example, if I have a menu with the graphic home.gif and another graphic email.gif. Both of these are hyperlinks and when I click on home.gif I would like it to change to another image. However, I do not want it to change back to it's original state unless I click on email.gif. Please let me know if I need to explain this further. Any help if appreciated.
    Paul

  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Posts
    327
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have basically 2 events but dependent on both being used. Only way I can think of is to have a Javascript variable that is set when the first event occurs and then the second event will only result in something happening if the variable is set. You will then need to reset the variable when the second event has been serviced. Does that make sense? The varibale will have to be global. Hope this helps.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •