Sunday 15 July 2012

LightSwitch Published JavaScript if statement Ok in I.E. Not OK in FireFox -



LightSwitch Published JavaScript if statement Ok in I.E. Not OK in FireFox -

i have jscript postrender code block attached info element sets background color of rowlist row depending on value.

works ok when browser ie firefox doesn't show color alterations.

the color setting code, timing of phone call , attendant files ok because if create color code unconditional within block works firefox.

so appears if statements not getting triggered. given info if statements dependent on appearing ok in rows albeit uncolored , browser alter @ loss.

can 1 see problem next code? or know how create 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" }); } };

javascript firefox

No comments:

Post a Comment