javascript code
Posted: Tue Oct 15, 2024 3:56 pm
I use the following on custom code browse and edit to make the row yellow if the 8th column value is 1. (Think I got this off Ke1vin1)
I would like to do the same on another browse form but this time the column has a date value, I would like to make the row yellow if the date value is 90 days or more than the current date, my javascript skills are limited and have tried using ChatGPT but seem to be getting more and more javascript errors. Anybody any samples of this kind of javascript? Thanks in advance.
Code: Select all
function rowYellow2() {
$('[data-nu-column="7"]').each(function () {
const cell = $(this);
const row = cell.attr("data-nu-row");
if (cell.html() === "1") {
$('[data-nu-row="' + row + '"]').css("background-color", "#FFE9A5");
}
});
}
if (nuFormType() === 'browse') {
rowYellow2();
}