...

View Full Version : double-duty mouseover



graphicsdude
07-01-2005, 04:24 AM
I am trying to get two actions out of one mouseover and have run out of things to try. When the user puts their cursor over a paticular button I want the button to change color AND allow some text to scroll. I can only get one or the other to work.

glenngv
07-01-2005, 04:39 AM
Code?

graphicsdude
07-01-2005, 05:10 AM
Wow, I was kinda hoping it would all be stupidly simple. The button up section is where I was testing possibilities. The one below puts two buttons next to each other (one blinks, one scrolls, but not as one button).

Is this clear as mud?


<!-- Text Frame -->
<div style="position:absolute; top:0px; left:240px">
<br><br><br><br>
<iframe id="ifr" name="ifr" src="dream_of_armageddon.html" frameBorder="0" width="450px" height="460" scrolling="no">
</iframe>
</div>

<!-- Table -->
<div style="position:absolute; top:0px; left:0px; width:800px; height:600px">
<img src="wellsimages/readerontableHoles.gif" width="800" height="600" border="0">
</div>

<!-- Button -up -->
<div style="position:absolute; top:86px; left:714px">
<a id="up" href="#" onmouseover="scrollup(); return false" onMouseOut="clearInterval(TO)"><img src="../butoff22.gif" name="up" width="33" height="33" alt="" border="0"></a>
<a href=" " onMouseOut="RestoreImg()" onMouseOver="SwitchImg('document.top','document.top','../buton22.gif')"><img src="../butoff22.gif" name="top" width="33" height="33" alt="" border="0"></a>
</div>

<!-- Button -down -->
<div style="position:absolute; top:163px; left:714px">
<a id="down" href="#" onmouseover="scrolldown(); return false" onmouseout="clearInterval(TO)"><img src="../butoff22.gif" name="down" width="33" height="33" alt="" border="0"></a>
</div>

jshl_wiz
07-01-2005, 05:21 AM
I believe that instead of using two 'onmouseover' events you only use one, example:

<a href="#" onmouseover="yourFunctionHere(); return false; yourOtherfunctionhere()"><img></a>

glenngv
07-01-2005, 05:29 AM
The return false in the middle will cause the function call after it not to be executed. It should be at the end.

onmouseover="yourFunctionHere();yourOtherfunctionhere();return false;"

SpirtOfGrandeur
07-01-2005, 02:43 PM
And why would you want the return to be false? I may be mistaken but doesnt this cancel the bubble effect of anything else that you are going to be calling later? Or does only cancel any more functions you have hooked to OnMouseOver?

graphicsdude
07-09-2005, 01:43 AM
Hey guys, thanks for the suggestions. To answer one question, the "return false" stops the text from scrolling. I haven't got back to you all before now because I have been trying everything I can think of to get the button to light up and have the text scroll. Nothing works.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum