How to change progressbar background color using javascript

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How to change progressbar background color using javascript

    I was looking for how to change the progress bar background color using JavaScript. possibly adding a CSS class to the progress bar from JavaScript.
    I have tried but failed. any help will be appreciated.

    source code:
    javascript:
    function ShowProgressBar(progressBar, progressValue, message) {
                progressBar.show();
                progressBar.updateProgress(progressValue, message);
    //need to add the css class here something like progressBar.addClass('green-bar')
            }
    CSS:
    .green-bar{
            background:#008000;
    }
    Last edited by rezoan; Apr 08, 2014 at 12:06 PM.
  2. #2
    Hi @rezoan,

    Please try this CSS rule:
    .green-bar .x-progress-inner {
        background-image: none;
        background-color: green;
    }
  3. #3
    Daniil thanks for the reply, unfortunately it does not work. don't know why. by the way i have solved this,

    CSS:
        .green-bar .x-progress-bar{
            background:#008000;
    }
    javascript:
    progressBar.addClass('green-bar'); //obviously i have removed the added css class after use.





    Quote Originally Posted by Daniil View Post
    Hi @rezoan,

    Please try this CSS rule:
    .green-bar .x-progress-inner {
        background-image: none;
        background-color: green;
    }
    Last edited by rezoan; Apr 09, 2014 at 7:24 AM.

Similar Threads

  1. [CLOSED] Change background color of button
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 17, 2013, 2:17 PM
  2. [CLOSED] Change TreePanel background color and toolbar color
    By jchau in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 07, 2012, 4:42 PM
  3. Replies: 2
    Last Post: Dec 29, 2011, 2:11 AM
  4. Replies: 12
    Last Post: Jun 17, 2009, 12:07 PM
  5. Change Tab background color or background image
    By georgelanes in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 3:55 PM

Tags for this Thread

Posting Permissions