//flex table opened by JP

Click to See Complete Forum and Search --> : onMouseOver with CSS


neverwhere
11-18-2003, 08:30 PM
<div id="linkdiv" onMouseOver="mOver(this,'#000000');" onMouseOut="mOut(this,'#FFFFFF');"><script language="javascript">
<!--//

function mOver(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'default'; src.bgColor = clrOver;
}
}

function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}

//-->
</script>Works when I change it to a table, but not if its in a div. Can you have onMouseOver with CSS?

ubes
11-19-2003, 09:49 AM
This has notijg to do with CSS ;) You try to change a color using JavaScript basen on build-in event-triggers (mouse events)

for css guides look at http://www.w3schools.com/css
or
http://csszengarden.com/

I guess the script does not work coz the div does not have a bgColor property and the table does have one....

neverwhere
11-19-2003, 12:54 PM
yeah, I just made it have a main div and then just embed some tables in .. its easier that way :D

Baddog
11-19-2003, 01:14 PM
http://www.jsmadeeasy.com/javascripts/Mouse%20Tricks/list.htm Thought you might like this.:t

neverwhere
11-19-2003, 04:20 PM
muahahaha, i love that site!

www.cs.uiowa.edu/~bengel

I just couldnt resist some of those.. see if you can figure em out :t