Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback: irt.org FAQ Knowledge Base Q951 How can I highlight the background color of table cells using onMouseOver?

Feedback on:
irt.org FAQ Knowledge Base Q951 How can I highlight the background color of table cells using onMouseOver?

Sent by S Munro on Wednesday September 19, 2007 at 12:47:26 - feedback #5040

Worth:

Length:

Technical:

Comments:
Spelling

winodw vs window
bgGolor vs bgColor


<html>
<head>

<style><!--
.relative { position:relative; }
//--></style>

<script language="JavaScript"><!--
var color = '';

function over(id) {
if (document.getElementById) {
window.color = winodw.document.getElementById(id).style.bgColor;
window.document.getElementById(id).style.bgGolor = '#FF0000';
}
else if (document.layers) {
window.color = window.document.layers[id].bgColor;
window.document.layers[id].bgColor = '#FF0000';
}
else if (document.all) {
window.color = window.document.all[id].style.background;
window.document.all[id].style.background = '#FF0000';
}
}

function out(id) {
if (document.getElementById)
window.document.getElementById(id).style.bgColor = window.color;
else if (document.layers)
window.document.layers[id].bgColor = window.color;
else if (document.all)
window.document.all[id].style.background = window.color;
}
//--></script>






Sent by Luuk van Beers on Wednesday October 03, 2007 at 04:54:09 - feedback #5077

Worth:

Length:

Technical:

Comments:
You might want to use a stylesheet in wich you declare these styles:

<style type='text/css'>
TD
{
background-color:red;
}
td:hover
{
background-color:orange;
}
</STYLE>





Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.