troubleshooting Question

A simple challenge - mouseout, mouseover, mousedown

Avatar of Chrism
ChrismFlag for Australia asked on
JavaScript
6 Comments2 Solutions534 ViewsLast Modified:
Hi,

I getting a webpage developed and I am being told that the following is not possible.  I don't believe them.  So...I am after a sample bit of code that will do the following:

The page that is currently working has:

- 3 buttons to navigate
- The buttons are graphics
- When the mouse is passed over the buttons, the buttons 'light up' with an alternate graphic
- When the mouse is clicked, the iframe is changed to the target of the button, and the parent frame (with the nav) is not refreshed

This is great.  What I want to happen though is for the button to remain 'lit up' once the button has been clicked.  Then, as you pass the mouse over the nav. buttons, the 'active' one stays lit and the other are only lit when the mouse is over them.

Once the user clicks on a second button, then it is the only one that stays on.  The previously 'lit' button, then goes back to the standard mouseover action.

Does this make sense?

I don't know javascript, but to my layman's way of thinking, when the button is clicked, you just turn off the mouseout event for that button, check the other buttons and turn off any that are one, while re-enabling the mouseout event for them.

Either that or just set a button[n]_clicked flag, and for every mouseout, check the flag status before changing the button image.

Looking forward to your responses.

Thanks,
Chris
ASKER CERTIFIED SOLUTION
aaronchan

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros