...

View Full Version : javascript keep triggering mouseout :(



kattie
03-16-2005, 02:02 PM
i am trying to implement a mouse over / mouse out effect(just to make a body of text dissaprear) on a html table. the problem is i have a javascript dropdown in that table. every time i hover hover over the menu my mouse over / mouse out keeps flicking on and off. although my cursor is still in the table, each option in the menu keeps registering as a mouse out. ive tried to overcome this using an invisible gif on top of the drop down. that didnt work :( has anyone dealt with this problem before...? thank in advance. Katie

Mr J
03-16-2005, 03:13 PM
You may be able to use event.cancelBubble

Can you post your code?

martijntje
03-16-2005, 03:16 PM
Why not use CSS for that? Hide the text with display: none; and create a pseudoclass with :hover, where you set the display to block, inline or whatever you wish to use.

kattie
03-16-2005, 04:23 PM
You may be able to use event.cancelBubble

Can you post your code?

here are my function for setting visibility of the text box

function MM_HideLayersOver() {
document.all.testvisible.style.visibility="hidden";
self.setTimeout('subfunction()', 1000)
}

function MM_HideLayersOut() {
self.setTimeout('subfunction()', 1000)
document.all.testvisible.style.visibility="visible";
}

here is my current call :(

<a href = "www.google.com" onMouseOver="MM_HideLayersOver()" onMouseOut="MM_HideLayersOut()">
<img src="http://admin.digitalriver.com/v2.0-img/operations/symcorp/image/g/h/o/ghost.gif" id="centeredimage">
</a>

here is the kind of this going on im my dropdown. all my catagories and the dropdow for the first category. hope this helps??

,"<div align=\"left\">TEST TEXT<img src='spacer.gif' height='1' width='48'>&gt;</div>","show-menu=isec",,,0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"<div align=\"left\">TEST TEXT <img src='spacer.gif' height='1' width='50'>&gt;</div>","show-menu=virus",,,0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"<div align=\"left\">TEST TEXT <img src='spacer.gif' height='1' width='50'>&gt;</div>","show-menu=problem",,,0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"<div align=\"left\">TEST TEXT <img src='spacer.gif' height='1' width='55'>&gt;</div>","show-menu=communication",,,0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,"<div align=\"left\">TEST TEXT <img src='spacer.gif' height='1' width='43'>&gt;</div>","show-menu:diskman",,,0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
])

addmenu(menu=["isec",
,,177,1,,pullDownStyle,,,pullDownEffect,,,,,,,,,,,,
,"TEST TEXT","ec_MAIN.Entry10?V1=646659&PN=1&SP=10023&xid=27684&CID=185854&DSP=&CUR=826",,,0
,"TEST TEXT","ec_MAIN.Entry10?V1=646655&PN=1&SP=10023&xid=27684&CID=185854&DSP=&CUR=826",,,0
])

Mr J
03-16-2005, 06:13 PM
Unfortunately the code you have posted does not help.

I do not see the code for the table or how you have implimented the call to hide/show the text.

If the call is made by this

<a href = "www.google.com" onMouseOver="MM_HideLayersOver()" onMouseOut="MM_HideLayersOut()">
<img src="http://admin.digitalriver.com/v2.0-img/operations/symcorp/image/g/h/o/ghost.gif" id="centeredimage">
</a>


then it should not affect anything else in the table, I was assuming that you had put the call in the opening table tag.

Also the functions for hiding and showing will only work in IE and you would be better with the following

function MM_HideLayersOver() {
document.getElementById("testvisible").style.visibility="hidden";
self.setTimeout('subfunction()', 1000)
}

function MM_HideLayersOut() {
document.getElementById("testvisible").style.visibility="visible";
self.setTimeout('subfunction()', 1000)
}

Can you post the url to your actual page?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum