Multiple onMouseOver commands
Hello,
I have a question about "onMouseOver" and "onMouseOut" commands. How would you combine them if you want 2 effects for each?
I'm already using the onMouseOut and onMouseOver commands to do a rollover effect, and want to also have an onmouseout & onmouseover command to write to the status bar.
Here is an example of the commands for the rollover(just the 'onmouse' parts):
onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','images/buttons/TChomelefttwo.jpg',1)"
But how would I implement the onmouseover to write to the status bar at the bottom of the page also? Or, is it possible?
Thanks,
-Tallon-
-tallon
Vincent Puglia posted this at 00:13 — 20th March 2000.
They have: 634 posts
Joined: Dec 1999
Hi,
You have 2 options:
1) call a function that executes both desired effects; or,
2) onMouseOut="MM_swapImgRestore(); window.status='blahblah';return truel"
onMouseOver would be the same. The only thing you would need to watch out for are the quotes (single within double).
If you use the second method for inline javascript (if/else statements, etc), it is usually a good idea to preface the code with the keyword "javascript:" as in:
onBlur="javascript:if(something)dothis();else dothat();"
hope this helps
Vinny
------------------
GrassBlade: cut&paste javascript
Where the world once stood
the blades of grass cut me still
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.