Some beginners ideas about JavaScript mouse event handling in different browsers
Some beginners ideas about JavaScript mouse event handling in different browsers From the very beginning JavaScript had to fight the various browser incompatibilities and this is still an issue today. In this blog Id like to highlight some of the issues with JavaScript mouse events. Nothing new for the experienced JavaScript developer but an issue of confusion for newcomers. And I wont go into the IE and Microsoft event model (look here for a good description) differences but restrict myself to Firefox and Safari. My experimental setup consists of two SELECT boxes called Left and Right . The Left box contains one OPTION element. The boxes and the option are coloured to highlight their boundaries. A TEXTAREA shows the log of events (and can be cleared with the Clear log button). The SELECT boxes have been set up to capture MOUSEOVER, MOUSEDOWN and MOUSEUP events. There is one line in the log for each event consisting of: the type of event (MOUSEOVER etc.) the type of element wh...