The onMouseOver event centralized in one place
Everybody knows the (normally pleasant) effect of a button changing colour or font or anything else when the mouse moves over it
In this brief article we will discuss about the meaning of this event and how we can centralized its management
1. The event triggers a javascript routine
The action enclosed in dobble quotes is in reality a short Javascript routine as can be seeing by changing the event definition
<IMG src="./images/back1.jpg" alt="back" onMouseOver='isOver(this);' onMouseOut='isNotOver(this);' >
This fact can be very handy in certain situations.
2. OnMouseOver events for several buttons
On www.guistuff.com is offered a very pratical tool for generating navigation bars (you will have to subscribe in order to use it, but it is free)
I have generated a navigation bar for three sites I access daily
I think it is much more confortable to rewrite the table
As you see, in the second example the mouse events execute a central javascript script.
Some of you will think that the advantage was not worth the effort, and you may be right, because the real advantage appears if we generate these tables dynamically using a function generateNavMenu