Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 14 su 14

Discussione: check

  1. #11

  2. #12
    codice:
    var marked_row = new Array;
    function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
    {
        var theCells = null;
        if ((thePointerColor == '' && theMarkColor == '')
            || typeof(theRow.style) == 'undefined') {
            return false;
        }
        if (typeof(document.getElementsByTagName) != 'undefined') {
            theCells = theRow.getElementsByTagName('td');
        }
        else if (typeof(theRow.cells) != 'undefined') {
            theCells = theRow.cells;
        }
        else {
            return false;
        }
        var rowCellsCnt  = theCells.length;
        var domDetect    = null;
        var currentColor = null;
        var newColor     = null;
        if (typeof(window.opera) == 'undefined'
            && typeof(theCells[0].getAttribute) != 'undefined') {
            currentColor = theCells[0].getAttribute('bgcolor');
            domDetect    = true;
        }
        else {
            currentColor = theCells[0].style.backgroundColor;
            domDetect    = false;
        }
        if (currentColor.indexOf("rgb") >= 0)
        {
            var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                         currentColor.indexOf(')'));
            var rgbValues = rgbStr.split(",");
            currentColor = "#";
            var hexChars = "0123456789ABCDEF";
            for (var i = 0; i < 3; i++)
            {
                var v = rgbValues[i].valueOf();
                currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
            }
        }
        if (currentColor == ''
            || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
            if (theAction == 'over' && thePointerColor != '') {
                newColor              = thePointerColor;
            }
            else if (theAction == 'click' && theMarkColor != '') {
                newColor              = theMarkColor;
                marked_row[theRowNum] = true;
            }
        }
        else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
                 && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
            if (theAction == 'out') {
                newColor              = theDefaultColor;
            }
            else if (theAction == 'click' && theMarkColor != '') {
                newColor              = theMarkColor;
                marked_row[theRowNum] = true;
            }
        }
        else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
            if (theAction == 'click') {
                newColor              = (thePointerColor != '')
                                      ? thePointerColor
                                      : theDefaultColor;
                marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                      ? true
                                      : null;
            }
        }
        if (newColor) {
            var c = null;
            if (domDetect) {
                for (c = 0; c < rowCellsCnt; c++) {
                    theCells[c].setAttribute('bgcolor', newColor, 0);
                }
            }
            else {
            for (c = 0; c < rowCellsCnt; c++) {
                    theCells[c].style.backgroundColor = newColor;
                }
            }
        }
        return true;
    }
    function setCheckboxColumn(theCheckbox){
        if (document.getElementById(theCheckbox)) {
            document.getElementById(theCheckbox).checked = (document.getElementById(theCheckbox).checked ? false : true);
            if (document.getElementById(theCheckbox + 'r')) {
                document.getElementById(theCheckbox + 'r').checked = document.getElementById(theCheckbox).checked;
            }
        } else {
            if (document.getElementById(theCheckbox + 'r')) {
                document.getElementById(theCheckbox + 'r').checked = (document.getElementById(theCheckbox +'r').checked ? false : true);
                if (document.getElementById(theCheckbox)) {
                    document.getElementById(theCheckbox).checked = document.getElementById(theCheckbox + 'r').checked;
    }}}}

    function.js
    PIERCHI

  3. #13
    così hai tutto
    PIERCHI

  4. #14
    uarghhhh

    non riesco
    PIERCHI

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.