Changing OnClick to OnMouseOver

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
msoden
Advanced
Advanced
Posts: 23
Joined: Wed Aug 18, 2004 4:20 pm
Location: Virginia
Contact:

Changing OnClick to OnMouseOver

Post by msoden »

I have a client who would like the main navigation (not sub-nav) of their site to a OnMouseOver and not the usual OnClick. I have advised them against this request to no avail. I can find areas in the code where I think I should be changing it; however I would like to verify. Has anybody had this question or even done it. If so, please advise how to do it.

Thanks
MS
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Could you clarify a bit. Do you mean they want a submenu to open on mouseover or do they want a main menu link to work onMouseover i.e. take the person to the link?

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Changing OnClick to OnMouseOver

Post by John »

msoden wrote:I can find areas in the code where I think I should be changing it...
If you're talking about changing the menu code itself - don't. Not only are you asking for big problems, you will also lose all support.

If I misinterpreted - sorry.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi MS,

Are you talking about having a menu where simply mousing over an item takes the user to another page? If so, I can see why you tried to convince your client otherwise; he or she is insane!

Anyway, you could write a simple js function to change the page's location.href to a new url, and call the function with the menu item's onfunction= property (if you need more detail, I can show you). I wouldn't put too much effort into it thought, because when the client realizes how insane that is, and how many people hate their site because of it, they will certainly want you to change it.

Cheers,

Kevin
msoden
Advanced
Advanced
Posts: 23
Joined: Wed Aug 18, 2004 4:20 pm
Location: Virginia
Contact:

Post by msoden »

Kevin,
Thank you for the information. The client would like for the page to change on a mouse over, not on click. I totally agree with you regarding the request. The problem was he saw a site with a remote rollover and thought the page was changing when in reality it was just swaping images. I have since been able talk him out of the requirement.

MS
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

msoden wrote:...I have since been able talk him out of the requirement.
An "A" for customer relations and guidance!

Cheers,

Kevin
Post Reply