Feedback on: irt.org FAQ Knowledge Base Q581
Worth:
Worth reading
Comments:
There is a problem with this in IE5 (don't know about other versions). The text is apparently known to IE5 as a separate object. When the mouse pointer crosses into the DIV it changes the text. But, as soon as the pointer moves one more pixel into the actual text the onMouseOut event of the DIV gets fired and the text changes back. If you move the mouse pointer into the DIV area to the right of the text, then things work as you would have expected.
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
I tried this code in Netscape 4.72 and IE 5.0. In Netscape, it works perfectly just as the mouse rolls over or out of any part of the text. In IE, the change occurs when the mouse moves ANYWHERE in the horizontal space (line) where the text is, and if over the actual text, pops back and forth between mouse in and mouse out (appears to trigger the onmouseout while still over the text). I think I understand the ANYWHERE problem (<div> as a block element), but why the erratic mousein/out behaviour?
Thanks!
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
causes an instant application crash in Internet Explorer 5 for the Mac.
Technical:
Not technical enough
Comments:
Something is missing from your information on the possible text color change effect.
I copied the text on your page and put it into a test webpage.
The text was displayed as standard text, but the page exhibited NO on"mouseover" effects.
I am running Netscape 4.76 from a Windows NT PC. I know that IE and Netscape handle these items differently, but your webpage comments inferred that this method should have worked on Netscape.
Perhaps this version/platform combination will not support this effect, or possibly there is an important piece of information left out of your discussion.
Worth:
Worth reading
Length:
Just right
Comments:
It's easy enough using the SPAN tag, and it won't cause the entire line to act on the event as a DIV tag will. You can use a mouseover and mouseout to simulate the effect of a roll over. Even javascript can be triggered with an even as part of the SPAN tag. Works in any HTML level 4 browser and up.
<br>
<br>
<br>
<span onmouseover="style.color='red'">Point here for red text.</span>
<br>
<br>
<span onmouseover="style.color='red'" onmouseout="style.color='black'">Point here to highlight red then change back</span>
<br>
<br>
<span onmouseover="javascript:alert('I love DHTML')">Point your mouse here for an alert</span>
<br>
<br>