0

I have a JScript postRender code block attached to a data element that sets the background color of a rowlist row depending on a value.

Works OK when Browser is IE but FireFox doesn't show the color alterations.

The Color setting code, timing of call and any attendant files are OK because if I make the color code unconditional inside the block it works for FireFox.

So it appears to be the if statements that are not getting triggered. Given the data that the if statements are dependent on is appearing OK in the rows albeit uncolored and it is only a browser change I am at a loss.

Can any one see the problem with the following code? Or know how to make it FireFox compatible? Thanks.

    myapp.ViewInstallationW.battery1_postRender = function (element, contentItem) {
    // Write code here.
    var k = element.innerText;
    if( k > 4.0) {
        $(element).parent().css({
            "background-color": "green",
            "background-image": "none",
            color: "yellow"
        });

    }
    if (k < 4.0 && k>3.5) {
        $(element).parent().css({
            "background-color": "yellow",
            "background-image": "none"


        });
    }
    if (k <= 3.5) {
        $(element).parent().css({
            "background-color": "red",
            "background-image": "none"


        });
    }



};
Bob Clegg
  • 553
  • 2
  • 9
  • 21

0 Answers0