View Full Version : mouseOver event problem
steve_ghb
03-11-2002, 02:44 PM
I have a problem with the mouseOver event failing to occur. I use XSL to convert XML to HTML. The resulting page consists of multiple layers that are made visible by tabs (actually just table cells made to look like clickable tabs). The text inside each tab is inside a <span> tag that makes a javascript call when the onMouseOver event occurs. The javascript function changes the text color and underlines the text, to make it appear like a clickable link.
For some reason the onMouseOver event and resulting javascript call sometimes happens, and sometimes it doesn't. About the only thing I can tell you is that the problem was reported the day after IE 6 started being used. Also, when one particular tab is clicked, and then the user returns to the original tab that was having the problem, the problem doesn't happen anymore.
Any help will be greatly appreciated, I've been pulling my hair out trying to find the problem.
Thanks,
Steve
scoutt
03-11-2002, 03:01 PM
code or example?
also IE6 has been out for quite a while, so why do you think it ie IE? unless your work just started to use it.
steve_ghb
03-11-2002, 03:13 PM
Don't know if this code will help, but here it is:
<span id="mytabs" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<xsl:attribute name="onclick"> showLayer("Checklist", this)</xsl:attribute>
Checklist
</span>
That's it. When the user puts the mouse over the word 'Checklist', the javascript function changes the text color and underlines it.
As for IE 6, you're right. It was just installed on the user's desktops the day before the problem was reported. Like I said, It doesn't happen all the time, and I haven't been able to isolate any one situation when it always happens, or any one thing that is always present when it happens.
scoutt
03-11-2002, 04:55 PM
try this:
<span id="mytabs" onmouseover="mouseOver(this); return true;" onmouseout="mouseOut(this); return false">
<xsl:attribute name="onclick"> showLayer("Checklist", this)</xsl:attribute>
Checklist
</span>
steve_ghb
03-12-2002, 10:23 AM
I found a solution but I'd really like to understand why this was happening.
I focused on the part of the XSL/HTML dealing with the 'Checklist' layer since clicking on that tab would resolve the problem. I discovered that it was only happening when there was data in the table on the checklist layer. When checking the code, I found that on the other layers, the table tag had the style attribute set to 'position: absolute; top: 100;', but the checklist layer table had no attributes set. When I put the style attribute in that table tag, the problem does not occur. The checklist layer is behind the tab where the problem was happening.
Can anybody explain why not having the style attribute set on a table would cause it to interfere with another layer?
Jon Hanlon
03-12-2002, 04:57 PM
It's not so much interfering with another layer, it's more to do with what's disabled. Unless an element is positioned then certain things are turned off. For instance, it's very hard to move a non-positioned element.
You must specify height and/or width and absolute/relative positioning to make an element positioned.
steve_ghb
03-13-2002, 11:13 AM
Thanks Jon
I'm still not sure I understand why not positioning a table on one layer would cause problems with the mouseOver event on another layer, but at least I can move on and make sure all other tables are positioned to avoid this in the future.
Later,
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.