View Full Version : Mouse over Multiple commands
teago
06-20-2008, 02:33 AM
hey all!
im posting in desperate help for somebody to..... surprisingly help me :thumbsup:
im having this problem in that this command aint working.
<img src="images/roster/6.jpg" onmouseover="ctrosterrealname ('andy');" onmouseout="ctRosterrealnameClean();" onmouseover="ctrosteronlinename('andy');" onmouseout="ctrosteronlinenameclean();" class="roster_pic2"/>
the onmouse commands work seperately.. but i want the onmouseover action to do multipul commands at once (2is fine for the moment) could someone tell me how to make the command to two things at once? thanks!!!! :D
i have tried this also .....onmouseover="ctrosterrealname ('andy'); ctrosteronlinename('andy');" but no luck :(
rangana
06-20-2008, 02:41 AM
First, this is not CSS, but rather JS. Anyway, try this:
<img src="images/roster/6.jpg" onmouseover="ctrosterrealname ('andy');ctrosteronlinename('andy');" onmouseout="ctRosterrealnameClean();ctrosteronlinenameclean()" class="roster_pic2"/>
teago
06-20-2008, 11:44 AM
for some reason they conflict and nothing happens :s thanks for the help tho. i shall move my post over to js section :D
rangana
06-20-2008, 12:17 PM
for some reason they conflict and nothing happens :s thanks for the help tho. i shall move my post over to js section :D
What error does the console throws?
teago
06-20-2008, 12:19 PM
none im just typing it into wordpad.
rangana
06-20-2008, 12:22 PM
none im just typing it into wordpad.
Wrap your codes here using the tags.
We can't figure what's wrong.
teago
06-20-2008, 12:31 PM
no problem. do u want me to send u the files in a zip file?
so you can have a look at it?
rangana
06-20-2008, 12:32 PM
If you can just wrap it in the forum, please do so.
Some members (like me) gets paranoid opening a zipped file :p
teago
06-20-2008, 12:35 PM
lol i know how u feel. lol erm wrap into forum?
teago
06-20-2008, 12:41 PM
<div align="center">
<img src="images/roster/1.jpg" onmouseover="ctRosterrealname('Adrian Stuart Teague');" onmouseout="ctRosterrealnameClean();" class="roster_pic2"/>
<img src="images/roster/2.jpg" onmouseover="ctRosterrealname('Richard Swetnam');" onmouseout="ctRosterrealnameClean();" class="roster_pic2"/>
<img src="images/roster/3.jpg" onmouseover="ctRosterrealname('4reals name');" onmouseout="ctRosterrealnameClean();" class="roster_pic2"/>
<img src="images/roster/4.jpg" onmouseover="ctRosterrealname('Robin Heap');" onmouseout="ctRosterrealnameClean();" class="roster_pic2"/>
<img src="images/roster/5.jpg" onmouseover="ctRosterrealname('William Fish');" onmouseout="ctRosterrealnameClean();" class="roster_pic2"/>
<img src="images/roster/6.jpg" onmouseover="ctrosterrealname ('andy');ctrosteronlinename('andy');" onmouseout="ctRosterrealnameClean();ctrosteronlinenameclean()" class="roster_pic2"/></div>
<div id="rosterrealname"></div>
<div id="rosteronlinename"></div>
is this wat u meant? the only thing is the commands work on there own (onmouseover="ctrosterrealname ('andy');") and (onmouseover=ctrosteronlinename('andy');") but not at the same time?
brazenskies
06-20-2008, 01:56 PM
are you trying to have 2 'onmouseovers'?
teago
06-20-2008, 01:59 PM
yea i am
brazenskies
06-20-2008, 02:02 PM
post your javascript function
teago
06-20-2008, 02:09 PM
2 codes for "Mouseover"
function ctRosterrealname(usrName)
{
var collection = usrName;
document.getElementById('rosterrealname').innerHTML = collection;
}
function ctRosteronlinename(usrName)
{
var collection = usrName;
document.getElementById('rosteronlinename').innerHTML = collection;
}
2 Codes for "Mouseout" action
function ctRosterrealnameClean()
{
document.getElementById('rosterrealname').innerHTML = "";
}
function ctRosteronlinenameClean()
{
document.getElementById('rosteronlinename').innerHTML = "";
}
Thanks alot :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.