Conditional Tab Colour

Conditional Tab Colour

Postby ScottG » Thu Jun 02, 2016 2:25 am

Is there any way to change the colour of a Tab depending on a database field?
What I am looking to do is within a contact database, for example, when I select a contact I already have a number of tabs of information but now want to have an Alert tab with say 5 check boxes on it. If check box 1 is ticked I want the tab to be Red in colour if any of the other 4 check boxes are ticked then I want the tab to be orange in colour or normal grey if nothing is ticked. (Its an easy visual way to indicate an alert status without going into the Alert tab.
ScottG
 
Posts: 6
Joined: Fri Nov 20, 2015 11:27 am

Re: Conditional Tab Colour

Postby hanstel » Thu Jun 02, 2016 10:18 pm

F12 is your friend
identify the handle, fire 'onchange' and apply your-css to the handle
hanstel
 
Posts: 28
Joined: Sat Apr 30, 2016 10:21 am

Re: Conditional Tab Colour

Postby admin » Wed Jun 08, 2016 10:22 am

ScottG,

hanstel is right.

Changing a field's background color can be done like this..

Code: Select all

   $('#field1').css('background-color','red');



Steven
admin
Site Admin
 
Posts: 3348
Joined: Mon Jun 15, 2009 9:53 am


Return to General



cron