Hello,
I have some read only kiosk tables (for display on TVs) that I set using php parameters and if/else if statements to manipulate css code.
Is this possible in nubuilder?
For example, I am using a custom browse code to show a view instead of a table so that my main browse form shows manipulated data from a table and it's related table.
I'd like to change the background color of a row if a field I'm not showing is either a particular value (== "value") or greater than/less than a relative date (today + 3day). Is this possible, and if so, what all is necessary to achieve this?
My js and php is amateurish.
Thank you
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
change background color of browse rows
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
Re: change background color of browse rows
mobilemcclintic,
By using nuLoadBrowse() http://wiki.nubuilder.net/nubuilderv3/i ... owse.28.29 you can do what ever you like to a browse screen (with js) after it loads.
Steven
By using nuLoadBrowse() http://wiki.nubuilder.net/nubuilderv3/i ... owse.28.29 you can do what ever you like to a browse screen (with js) after it loads.
Steven
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
Re: change background color of browse rows
If I try the below, i can change one cell
function nuLoadBrowse(){
var div = document.getElementById("row_0001_col_1");
div.style.backgroundColor="#888";
}
}
When I try this code, even with a 1tic_priority field with Urgent, nothing changes.
function nuLoadBrowse(){
if('#1tic_priority#' == 'Urgent'){
var div = document.getElementById("row_0001_col_1");
div.style.backgroundColor="#888";
}
}
My end goal, is to use 2 or more or if/and statements to control a background color and have it cycle for each row.
I really do appreciate the help.
function nuLoadBrowse(){
var div = document.getElementById("row_0001_col_1");
div.style.backgroundColor="#888";
}
}
When I try this code, even with a 1tic_priority field with Urgent, nothing changes.
function nuLoadBrowse(){
if('#1tic_priority#' == 'Urgent'){
var div = document.getElementById("row_0001_col_1");
div.style.backgroundColor="#888";
}
}
My end goal, is to use 2 or more or if/and statements to control a background color and have it cycle for each row.
I really do appreciate the help.
Re: change background color of browse rows
mobilemcclintic,
You'll just need to debug it (the same way I would have to).
But if you hit F12, you can try your js in the console.
Steven.
You'll just need to debug it (the same way I would have to).
But if you hit F12, you can try your js in the console.
Steven.