Forum Moderators: open

Message Too Old, No Replies

Trouble adding to "mouseover" event

         

mossimo

5:47 pm on Sep 8, 2003 (gmt 0)

10+ Year Member



Having trouble with this one.
mouseover calls two functions but I need to add bgColor back to mouseover for example.

onmouseover="over(this);View('lsquo');this.style.bgColor=("#cccccc")"
but the above dosn't work? Bellow is my code.

<TD style=bgColor="#ECECED" onmouseover="over(this);View('lsquo')" onmouseout=this.style.bgColor="#ECECED" onclick="ic('&lsquo;')">‘</TD>

I’m sure it can be done I just can’t get the syntax right.
What do you think, Thanks

korkus2000

5:58 pm on Sep 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any way to call the second function from the first instead of having 2 calls? It should make it cleaner but what you should work. You have a quote problem. In JavaScript quotes need to alternate between double and single quotes. I also don't think you need the paranthasis.

onmouseover="over(this);View('lsquo');this.style.bgColor=("#cccccc")"

should be

onmouseover="over(this);View('lsquo');this.style.bgColor='#cccccc'"

mossimo

9:00 pm on Sep 9, 2003 (gmt 0)

10+ Year Member



Sorry I forgot I posted this tread anyways it would never work because "over(this)" is calling a js function that’s using DOM to wright a different tag than style so my "this.style.bgColor" has no home any more. If that made any sense.