Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6064239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:15:31+00:00 2026-05-23T09:15:31+00:00

I have been working on a dashboard using the Google visualization where I am

  • 0

I have been working on a dashboard using the Google visualization where I am presenting data into a google table from a database query. So far, I have the table created and the data being presented perfectly, but now I want to add some conditional formatting based on specific values in the table.

I am trying for add some formatting to the table using the following code:

<style type='text/css'>
  .alert-frozen{background-color:#F8D0D8;}
  .alert-closed{background-color:#F8D0D8;}
</style>

$(function(table){
$.getJSON('src/getReleases.php', function(releaseData) {
                var rel = new google.visualization.DataTable();
                rel.addRows(releaseData.length);
                rel.addColumn('string','DatabaseID');
                rel.addColumn('string','Release ID');
                rel.addColumn('string','days_to_freeze');
                $.each(releaseData, function(k, val){
                    var days = parseInt(val.days_to_freeze);
                    if(days > 0){
                      //var a = "{'style':'background-color:#F8D0D8;'}";
                                              var a = "{'className': 'alert-frozen'}"   

                    }
                    rel.setCell(k, 0, val.database_id ,null ,{'className':a});
                    rel.setCell(k, 1, val.release_id ,null ,{'className':a});   
                    ... 

The problem is that the javascript variable does not seem to be expanded Testing indicates that ‘a’ is being set to the correct value, but not being displayed the the page is reloaded.

Probably a really simple problem, but I cannot seem to understand what I am doing wrong – someone help!

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:15:31+00:00Added an answer on May 23, 2026 at 9:15 am

    Right now a is the string

    "{'className': 'alert-frozen'}"
    

    but if you’re setting a itself as the className property you probably just want it to be the string

    'alert-frozen'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on asp.net 3.5.I want to Convert a DateTime Data from
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with a string[] array in C# that gets returned from
I have been working on a system which I'm using protobuf-net (version 2.0.0.480) for
I have been working on a Core Data iOS app that works perfectly through
I have been working on a website using MVC Preview 1 since it came
I have been working on a Notes integration project and I am using the
I have been working on a module to sync data between client side CRM
So, I am working on a demo web dashboard. Previously, I had been using
I have been working on a method to sync core data stored in an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.