improved pointer code (for Opera 6.0)
This commit is contained in:
@@ -7,6 +7,7 @@ $Source$
|
|||||||
|
|
||||||
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-12-08 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
|
* libraries/left.js, lines 234-240: fixed a js bug with empty databases.
|
||||||
|
* libraries/functions.js: improved pointer code (for Opera 6.0).
|
||||||
* left.php3: nicer codding for Opera exception.
|
* left.php3: nicer codding for Opera exception.
|
||||||
|
|
||||||
2001-12-07 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-12-07 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
@@ -305,14 +305,22 @@ function checkTransmitDump(theForm, theAction)
|
|||||||
*/
|
*/
|
||||||
function setPointer(theRow, thePointerColor)
|
function setPointer(theRow, thePointerColor)
|
||||||
{
|
{
|
||||||
if (thePointerColor == ''
|
if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
|
||||||
|| (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined')) {
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof(document.getElementsByTagName) != 'undefined') {
|
||||||
|
var theCells = theRow.getElementsByTagName('td');
|
||||||
|
}
|
||||||
|
else if (typeof(theRow.cells) != 'undefined') {
|
||||||
|
var theCells = theRow.cells;
|
||||||
|
}
|
||||||
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var row_cells_cnt = theRow.cells.length;
|
var rowCellsCnt = theCells.length;
|
||||||
for (var c = 0; c < row_cells_cnt; c++) {
|
for (var c = 0; c < rowCellsCnt; c++) {
|
||||||
theRow.cells[c].style.backgroundColor = thePointerColor;
|
theCells[c].style.backgroundColor = thePointerColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user