canadianjameson
05-28-2005, 08:02 AM
Hey. I started this a while back but it seems to have died out. I was wondering if someone could help me make a few final changes to it (while maintaining its cross-browser compatibility.
they are:
The ability to drag across the times to highlight that time for the entire week, but not the days (i.e: onDrag from 7:00 to 10:30 for the entire week)
The ability to select certain times and enter "highlight these from this date until this date".
the ability to have the highlighted times and corresponding classe-values saved to a database in a mirrored format
The last two may require turning this into a quazi-calendar type thing so if anyone has a free or premade one that this could be applied to, lemme know
if any clarification is needed, please let me know
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<style type="text/css">
table {
border-collapse: collapse; }
td {
border: 1px solid #333; }
/*.show {
visibility: visible }
.hide {
visibility: hidden }
*/
.blue {
background-color: #ccf }
.red {
background-color: #fcc }
.green {
background-color: #cfc }
.yellow {
background-color: #ffc }
</style>
<script language="javascript">
function Clear() {
var obj = document.getElementById('mySelect');
if ( obj != null ) {
obj.selectedIndex = 0;
}
var obj = document.getElementById('fullRow');
if ( obj != null ) {
obj.checked = false;
}
}
</script>
<script language="javascript">
function changeMyRowColor( e, obj ) {
var ClassName = GetClassName(e);
if ( ClassName != null ) {
var oRow = obj.parentNode;
if ( oRow.tagName == 'TR' ) {
for ( var x = 0 ; x < oRow.childNodes.length ; x++ ) {
//alert(oRow.childNodes[x].tagName + ' - ' + oRow.childNodes[x].id);
if ( oRow.childNodes[x] != null ) {
if ( oRow.childNodes[x].className != 'noColor' ) {
oRow.childNodes[x].className = ClassName;
}
}
}
}
}
}
function GetButtonPress(e) {
if ( !e ) {
var button = window.event.button;
} else {
var button = e.which;
}
return button;
}
function GetClassName( e ) {
oSelect = document.getElementById('mySelect');
var button = GetButtonPress(e);
return returnClassName(button);
}
function returnClassName( button ) {
oSelect = document.getElementById('mySelect');
if ( oSelect == null ) return null;
if ( oSelect.selectedIndex == 0 ) return null;
if ( button == 1 ) {
if ( oSelect.options == null ) { //Hack for IE
var ClassName = oSelect.childNodes[oSelect.selectedIndex].value;
} else {
var ClassName = oSelect.options[oSelect.selectedIndex].value;
}
} else {
var ClassName = '';
}
//alert(ClassName);
return ClassName;
}
function changeMyColColor( e, obj ) {
//alert('Im here!');
var ClassName = GetClassName(e);
if ( ClassName != null ) {
var oRow = obj.parentNode;
for ( var x = 0 ; x < oRow.childNodes.length ; x++ ) {
if ( obj == oRow.childNodes[x] ) break;
}
if ( x < oRow.childNodes.length ) {
var oBody = document.getElementById('mainBody');
if ( oBody != null ) {
for ( var y = 0 ; y < oBody.childNodes.length ; y++ ) {
var oRow = oBody.childNodes[y];
if ( oRow != null ) {
if ( oRow.childNodes[x] != null ) {
oRow.childNodes[x].className = ClassName
}
}
}
}
}
}
}
function forceMyColor( ClassName, obj ) {
if ( ClassName != null ) {
obj.className = ClassName;
}
}
function changeMyColor( e, obj ) {
var ClassName = GetClassName(e);
if ( ClassName != null ) {
obj.className = ClassName;
}
}
function mySelect_onChange( obj ) {
var myClass = '';
if ( obj.options == null ) { //Hack for IE
myClass = obj.childNodes[obj.selectedIndex].value;
} else {
myClass = obj.options[obj.selectedIndex].value;
}
var oObj = document.getElementById('demonstrationCell');
if ( oObj != null ) {
oObj.className = myClass;
}
var oObj = document.getElementById('entireRow');
if ( oObj != null ) {
if ( obj.selectedIndex > 0 ) {
oObj.className = 'show';
} else {
oObj.className = 'hide';
}
}
var oCheck = document.getElementById('fullRow');
if ( oCheck != null ) {
oCheck.checked = false;
}
}
var MouseDrag = 0;
function forceMouseDrag( bool ) {
//alert('here!');
MouseDrag = bool;
}
function setMouseDrag( e, obj, bool ) {
if ( bool == null ) {
MouseDrag = GetButtonPress(e);
} else {
MouseDrag = bool;
}
//alert(MouseDrag);
}
function changeMyColorDrag(e, obj) {
if ( MouseDrag > 0 ) {
forceMyColor( returnClassName(MouseDrag), obj );
//changeMyColor(e, obj );
}
}
// just make a button to call this function and it will clear all selected feilds
// function ClearAllCells() {
// oBody = document.getElementById('mainBody');
// if ( oBody != null ) {
// for ( var x = 0 ; x < oBody.childNodes.length ; x++ ) {
// var oRow = oBody.childNodes[x];
// for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
// var oCell = oRow.childNodes[y];
// if ( oCell.className != 'noColor' ) {
// oCell.className = ''
// }
// }
// }
// }
//}
</script>
</head>
<body onload="Clear()">
<br>
<form action="#">
<div align="center">
<select id='mySelect' onchange="mySelect_onChange(this);">
<option>Please Customize Your Schedual</option>
<option value="red">Class / Work</option>
<option value="blue">Definite Availiability</option>
<option value="green">Possibly Available</option>
<option value="yellow">Sleeping</option>
</select>
</div>
</form>
<table width="680" cellspacing="0" cellpadding="1" id='mainTable' onselectstart="return false">
<thead id='mainHead'>
<tr>
<td width="85" id="demonstrationCell"> </td>
<td width="85" class="noColor"><div align="center"><strong>Monday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Tuesday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Wednesday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Thursday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Friday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Saturday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Sunday</strong></div></td>
</tr>
</thead>
<tbody id='mainBody'>
<tr>
<td class="noColor"><div align="center"><strong> 7:00</strong><font size="-1">pm</font></div></td>
<td id="monday_7pm"> </td>
<td id="tuesday_7pm"> </td>
<td id="wednesday_7pm"> </td>
<td id="thursday_7pm"> </td>
<td id="friday_7pm"> </td>
<td id="saturday_7pm"> </td>
<td id="sunday_7pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>7:30</strong></div></td>
<td id="monday_730pm"> </td>
<td id="tuesday_730pm"> </td>
<td id="wednesday_730pm"> </td>
<td id="thursday_730pm"> </td>
<td id="friday_730pm"> </td>
<td id="saturday_730pm"> </td>
<td id="sunday_730pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>8:00</strong></div></td>
<td id="monday_8pm"> </td>
<td id="tuesday_8pm"> </td>
<td id="wednesday_8pm"> </td>
<td id="thursday_8pm"> </td>
<td id="friday_8pm"> </td>
<td id="saturday_8pm"> </td>
<td id="sunday_8pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>8:30</strong></div></td>
<td id="monday_830pm"> </td>
<td id="tuesday_830pm"> </td>
<td id="wednesday_830pm"> </td>
<td id="thursday_830pm"> </td>
<td id="friday_830pm"> </td>
<td id="saturday_830pm"> </td>
<td id="sunday_830pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>9:00</strong></div></td>
<td id="monday_9pm"> </td>
<td id="tuesday_9pm"> </td>
<td id="wednesday_9pm"> </td>
<td id="thursday_9pm"> </td>
<td id="friday_9pm"> </td>
<td id="saturday_9pm"> </td>
<td id="sunday_9pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>9:30</strong></div></td>
<td id="monday_930pm"> </td>
<td id="tuesday_930pm"> </td>
<td id="wednesday_930pm"> </td>
<td id="thursday_930pm"> </td>
<td id="friday_930pm"> </td>
<td id="saturday_930pm"> </td>
<td id="sunday_930pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>10:00</strong></div></td>
<td id="monday_10pm"> </td>
<td id="tuesday_10pm"> </td>
<td id="wednesday_10pm"> </td>
<td id="thursday_10pm"> </td>
<td id="friday_10pm"> </td>
<td id="saturday_10pm"> </td>
<td id="sunday_10pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>10:30</strong></div></td>
<td id="monday_1030pm"> </td>
<td id="tuesday_1030pm"> </td>
<td id="wednesday_1030pm"> </td>
<td id="thursday_1030pm"> </td>
<td id="friday_1030pm"> </td>
<td id="saturday_1030pm"> </td>
<td id="sunday_1030pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>11:00</strong></div></td>
<td id="monday_11pm"> </td>
<td id="tuesday_11pm"> </td>
<td id="wednesday_11pm"> </td>
<td id="thursday_11pm"> </td>
<td id="friday_11pm"> </td>
<td id="saturday_11pm"> </td>
<td id="sunday_11pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>11:30</strong></div></td>
<td id="monday_1130pm"> </td>
<td id="tuesday_1130pm"> </td>
<td id="wednesday_1130pm"> </td>
<td id="thursday_1130pm"> </td>
<td id="friday_1130pm"> </td>
<td id="saturday_1130pm"> </td>
<td id="sunday_1130pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>12:00</strong></div></td>
<td id="monday_12am"> </td>
<td id="tuesday_12am"> </td>
<td id="wednesday_12am"> </td>
<td id="thursday_12am"> </td>
<td id="friday_12am"> </td>
<td id="saturday_12am"> </td>
<td id="sunday_12am"> </td>
</tr>
</tbody>
</table>
<script language="javascript">
document.onmousedown = function ( event ) { setMouseDrag( event, this, null ) ; }
document.onmouseup = function ( event ) { setMouseDrag( event, this, 0 ) ; }
//document.onselectstart=function(){return false};
/*oTable = document.getElementById('mainTable');
if ( oTable != null ) {
oTable.onmouseout = function ( ) { forceMouseDrag( false ) ; }
} */
oBody = document.getElementById('mainBody');
var firstOneFound = false;
if ( oBody != null ) {
for ( var x = 0 ; x < oBody.childNodes.length ; x++ ) {
var oRow = oBody.childNodes[x];
var CellCounter = 0;
for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
oCell = oRow.childNodes[y];
if ( oCell.tagName == 'TD' ) {
if ( CellCounter == 0 ) {
oCell.onmousedown = function ( event ) { changeMyRowColor( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
} else if ( oCell.className != 'noColor' ) {
oCell.onmousedown = function ( event ) { changeMyColor( event, this ); }
oCell.onmousemove = function ( event ) { changeMyColorDrag( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
}
CellCounter++;
}
}
}
}
oHead = document.getElementById('mainHead');
if ( oHead != null ) {
for ( var x = 0 ; x < oHead.childNodes.length ; x++ ) {
var oRow = oHead.childNodes[x];
for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
oCell = oRow.childNodes[y];
if ( y == 0 ) {
// Blank Cell
} else {
oCell.onmousedown = function ( event ) { changeMyColColor( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
}
}
}
}
</script>
</body>
</html>
they are:
The ability to drag across the times to highlight that time for the entire week, but not the days (i.e: onDrag from 7:00 to 10:30 for the entire week)
The ability to select certain times and enter "highlight these from this date until this date".
the ability to have the highlighted times and corresponding classe-values saved to a database in a mirrored format
The last two may require turning this into a quazi-calendar type thing so if anyone has a free or premade one that this could be applied to, lemme know
if any clarification is needed, please let me know
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<style type="text/css">
table {
border-collapse: collapse; }
td {
border: 1px solid #333; }
/*.show {
visibility: visible }
.hide {
visibility: hidden }
*/
.blue {
background-color: #ccf }
.red {
background-color: #fcc }
.green {
background-color: #cfc }
.yellow {
background-color: #ffc }
</style>
<script language="javascript">
function Clear() {
var obj = document.getElementById('mySelect');
if ( obj != null ) {
obj.selectedIndex = 0;
}
var obj = document.getElementById('fullRow');
if ( obj != null ) {
obj.checked = false;
}
}
</script>
<script language="javascript">
function changeMyRowColor( e, obj ) {
var ClassName = GetClassName(e);
if ( ClassName != null ) {
var oRow = obj.parentNode;
if ( oRow.tagName == 'TR' ) {
for ( var x = 0 ; x < oRow.childNodes.length ; x++ ) {
//alert(oRow.childNodes[x].tagName + ' - ' + oRow.childNodes[x].id);
if ( oRow.childNodes[x] != null ) {
if ( oRow.childNodes[x].className != 'noColor' ) {
oRow.childNodes[x].className = ClassName;
}
}
}
}
}
}
function GetButtonPress(e) {
if ( !e ) {
var button = window.event.button;
} else {
var button = e.which;
}
return button;
}
function GetClassName( e ) {
oSelect = document.getElementById('mySelect');
var button = GetButtonPress(e);
return returnClassName(button);
}
function returnClassName( button ) {
oSelect = document.getElementById('mySelect');
if ( oSelect == null ) return null;
if ( oSelect.selectedIndex == 0 ) return null;
if ( button == 1 ) {
if ( oSelect.options == null ) { //Hack for IE
var ClassName = oSelect.childNodes[oSelect.selectedIndex].value;
} else {
var ClassName = oSelect.options[oSelect.selectedIndex].value;
}
} else {
var ClassName = '';
}
//alert(ClassName);
return ClassName;
}
function changeMyColColor( e, obj ) {
//alert('Im here!');
var ClassName = GetClassName(e);
if ( ClassName != null ) {
var oRow = obj.parentNode;
for ( var x = 0 ; x < oRow.childNodes.length ; x++ ) {
if ( obj == oRow.childNodes[x] ) break;
}
if ( x < oRow.childNodes.length ) {
var oBody = document.getElementById('mainBody');
if ( oBody != null ) {
for ( var y = 0 ; y < oBody.childNodes.length ; y++ ) {
var oRow = oBody.childNodes[y];
if ( oRow != null ) {
if ( oRow.childNodes[x] != null ) {
oRow.childNodes[x].className = ClassName
}
}
}
}
}
}
}
function forceMyColor( ClassName, obj ) {
if ( ClassName != null ) {
obj.className = ClassName;
}
}
function changeMyColor( e, obj ) {
var ClassName = GetClassName(e);
if ( ClassName != null ) {
obj.className = ClassName;
}
}
function mySelect_onChange( obj ) {
var myClass = '';
if ( obj.options == null ) { //Hack for IE
myClass = obj.childNodes[obj.selectedIndex].value;
} else {
myClass = obj.options[obj.selectedIndex].value;
}
var oObj = document.getElementById('demonstrationCell');
if ( oObj != null ) {
oObj.className = myClass;
}
var oObj = document.getElementById('entireRow');
if ( oObj != null ) {
if ( obj.selectedIndex > 0 ) {
oObj.className = 'show';
} else {
oObj.className = 'hide';
}
}
var oCheck = document.getElementById('fullRow');
if ( oCheck != null ) {
oCheck.checked = false;
}
}
var MouseDrag = 0;
function forceMouseDrag( bool ) {
//alert('here!');
MouseDrag = bool;
}
function setMouseDrag( e, obj, bool ) {
if ( bool == null ) {
MouseDrag = GetButtonPress(e);
} else {
MouseDrag = bool;
}
//alert(MouseDrag);
}
function changeMyColorDrag(e, obj) {
if ( MouseDrag > 0 ) {
forceMyColor( returnClassName(MouseDrag), obj );
//changeMyColor(e, obj );
}
}
// just make a button to call this function and it will clear all selected feilds
// function ClearAllCells() {
// oBody = document.getElementById('mainBody');
// if ( oBody != null ) {
// for ( var x = 0 ; x < oBody.childNodes.length ; x++ ) {
// var oRow = oBody.childNodes[x];
// for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
// var oCell = oRow.childNodes[y];
// if ( oCell.className != 'noColor' ) {
// oCell.className = ''
// }
// }
// }
// }
//}
</script>
</head>
<body onload="Clear()">
<br>
<form action="#">
<div align="center">
<select id='mySelect' onchange="mySelect_onChange(this);">
<option>Please Customize Your Schedual</option>
<option value="red">Class / Work</option>
<option value="blue">Definite Availiability</option>
<option value="green">Possibly Available</option>
<option value="yellow">Sleeping</option>
</select>
</div>
</form>
<table width="680" cellspacing="0" cellpadding="1" id='mainTable' onselectstart="return false">
<thead id='mainHead'>
<tr>
<td width="85" id="demonstrationCell"> </td>
<td width="85" class="noColor"><div align="center"><strong>Monday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Tuesday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Wednesday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Thursday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Friday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Saturday</strong></div></td>
<td width="85" class="noColor"><div align="center"><strong>Sunday</strong></div></td>
</tr>
</thead>
<tbody id='mainBody'>
<tr>
<td class="noColor"><div align="center"><strong> 7:00</strong><font size="-1">pm</font></div></td>
<td id="monday_7pm"> </td>
<td id="tuesday_7pm"> </td>
<td id="wednesday_7pm"> </td>
<td id="thursday_7pm"> </td>
<td id="friday_7pm"> </td>
<td id="saturday_7pm"> </td>
<td id="sunday_7pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>7:30</strong></div></td>
<td id="monday_730pm"> </td>
<td id="tuesday_730pm"> </td>
<td id="wednesday_730pm"> </td>
<td id="thursday_730pm"> </td>
<td id="friday_730pm"> </td>
<td id="saturday_730pm"> </td>
<td id="sunday_730pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>8:00</strong></div></td>
<td id="monday_8pm"> </td>
<td id="tuesday_8pm"> </td>
<td id="wednesday_8pm"> </td>
<td id="thursday_8pm"> </td>
<td id="friday_8pm"> </td>
<td id="saturday_8pm"> </td>
<td id="sunday_8pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>8:30</strong></div></td>
<td id="monday_830pm"> </td>
<td id="tuesday_830pm"> </td>
<td id="wednesday_830pm"> </td>
<td id="thursday_830pm"> </td>
<td id="friday_830pm"> </td>
<td id="saturday_830pm"> </td>
<td id="sunday_830pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>9:00</strong></div></td>
<td id="monday_9pm"> </td>
<td id="tuesday_9pm"> </td>
<td id="wednesday_9pm"> </td>
<td id="thursday_9pm"> </td>
<td id="friday_9pm"> </td>
<td id="saturday_9pm"> </td>
<td id="sunday_9pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>9:30</strong></div></td>
<td id="monday_930pm"> </td>
<td id="tuesday_930pm"> </td>
<td id="wednesday_930pm"> </td>
<td id="thursday_930pm"> </td>
<td id="friday_930pm"> </td>
<td id="saturday_930pm"> </td>
<td id="sunday_930pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>10:00</strong></div></td>
<td id="monday_10pm"> </td>
<td id="tuesday_10pm"> </td>
<td id="wednesday_10pm"> </td>
<td id="thursday_10pm"> </td>
<td id="friday_10pm"> </td>
<td id="saturday_10pm"> </td>
<td id="sunday_10pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>10:30</strong></div></td>
<td id="monday_1030pm"> </td>
<td id="tuesday_1030pm"> </td>
<td id="wednesday_1030pm"> </td>
<td id="thursday_1030pm"> </td>
<td id="friday_1030pm"> </td>
<td id="saturday_1030pm"> </td>
<td id="sunday_1030pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>11:00</strong></div></td>
<td id="monday_11pm"> </td>
<td id="tuesday_11pm"> </td>
<td id="wednesday_11pm"> </td>
<td id="thursday_11pm"> </td>
<td id="friday_11pm"> </td>
<td id="saturday_11pm"> </td>
<td id="sunday_11pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>11:30</strong></div></td>
<td id="monday_1130pm"> </td>
<td id="tuesday_1130pm"> </td>
<td id="wednesday_1130pm"> </td>
<td id="thursday_1130pm"> </td>
<td id="friday_1130pm"> </td>
<td id="saturday_1130pm"> </td>
<td id="sunday_1130pm"> </td>
</tr>
<tr>
<td class="noColor"><div align="center"><strong>12:00</strong></div></td>
<td id="monday_12am"> </td>
<td id="tuesday_12am"> </td>
<td id="wednesday_12am"> </td>
<td id="thursday_12am"> </td>
<td id="friday_12am"> </td>
<td id="saturday_12am"> </td>
<td id="sunday_12am"> </td>
</tr>
</tbody>
</table>
<script language="javascript">
document.onmousedown = function ( event ) { setMouseDrag( event, this, null ) ; }
document.onmouseup = function ( event ) { setMouseDrag( event, this, 0 ) ; }
//document.onselectstart=function(){return false};
/*oTable = document.getElementById('mainTable');
if ( oTable != null ) {
oTable.onmouseout = function ( ) { forceMouseDrag( false ) ; }
} */
oBody = document.getElementById('mainBody');
var firstOneFound = false;
if ( oBody != null ) {
for ( var x = 0 ; x < oBody.childNodes.length ; x++ ) {
var oRow = oBody.childNodes[x];
var CellCounter = 0;
for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
oCell = oRow.childNodes[y];
if ( oCell.tagName == 'TD' ) {
if ( CellCounter == 0 ) {
oCell.onmousedown = function ( event ) { changeMyRowColor( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
} else if ( oCell.className != 'noColor' ) {
oCell.onmousedown = function ( event ) { changeMyColor( event, this ); }
oCell.onmousemove = function ( event ) { changeMyColorDrag( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
}
CellCounter++;
}
}
}
}
oHead = document.getElementById('mainHead');
if ( oHead != null ) {
for ( var x = 0 ; x < oHead.childNodes.length ; x++ ) {
var oRow = oHead.childNodes[x];
for ( var y = 0 ; y < oRow.childNodes.length ; y++ ) {
oCell = oRow.childNodes[y];
if ( y == 0 ) {
// Blank Cell
} else {
oCell.onmousedown = function ( event ) { changeMyColColor( event, this ); }
oCell.oncontextmenu = function ( ) { return false; }
}
}
}
}
</script>
</body>
</html>