change background of button or table cell, possible ??
hi,
Is it possible to change the background color in an html page when the mouseover method is called ??
thanx
hi,
Is it possible to change the background color in an html page when the mouseover method is called ??
thanx
detox posted this at 13:43 — 2nd April 2001.
They have: 571 posts
Joined: Feb 2001
Here is code to change a cell onMouseover. Note, you can move the code to the tag to change whole row. This works in MSIE and Netscape 6. Netscape 4 simply ignores the code without error.
i do have a script at work which is cross browser (down to netscape 4 etc), but I will post that tomorrow
detox posted this at 14:11 — 2nd April 2001.
They have: 571 posts
Joined: Feb 2001
OK I have found the cross browser variant.
There is an external script that goes along with this example, so instead of posting it here, this is what I will do.
If you want to give me a pm or email I will email it to you. until I have finished my site I cant exactly just put it up somewhere for everyone to download.
cheers
walouh posted this at 14:21 — 2nd April 2001.
They have: 15 posts
Joined: Jan 2001
ya, it works very well !
but can do the same thing with the text contains within the cell ?
And so my e-mail is [email protected]
thanx for all...
detox posted this at 14:36 — 2nd April 2001.
They have: 571 posts
Joined: Feb 2001
netscape 6 now allows hovers over text links. Let me have a look at the code and I will get back to you
walouh posted this at 14:54 — 2nd April 2001.
They have: 15 posts
Joined: Jan 2001
the code :
function mouseOver(element) {
element.bgColor='#336633';
element.color = '#FFFFFF'; // dont't works !
}
function mouseOut(element) {
if (element.name != "CLICKED") {
element.bgColor='#FFFFFF';
element.color='#000000'; // dont't works !
}
}
function mouseClick(element) {
if (document.CLICKED != null) {
document.CLICKED.name="1";
}
element.name="CLICKED";
window.alert(element.name);
}
</script>
menu1
menu2
menu3
menu4
menu5
menu6
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.