title: Update JQuery Progressbar with JSON Response in an ajax Request
body: <p>All,</p>
  
  <p>I have an AJAX request, which makes a JSON request to a server, to get the sync status. The JSON Request and responses are as under: I want to display a JQuery UI progressbar and update the progressbar status, as per the percentage returned in the getStatus JSON response. If the status is "insync", then the progressbar should not appear and a message should be displayed instead. Ex: "Server is in Sync". How can I do this?</p>
  
  <pre><code>//JSON Request to getStatus
  {
      "header": {
          "type": "request"
      },
      "payload": [
          {
              "data": null,
              "header": {
                  "action": "load",
              }
          }
      ]
  }
  
  //JSON Response of getStatus (When status not 100%)
  {
      "header": {
          "type": "response",
          "result": 400
      },
      "payload": [
          {
              "header": {
                  "result": 400
              },
              "data": {
                  "status": "pending",
                  "percent": 20
              }
          }
      ]
  }
  
  //JSON Response of getStatus (When percent is 100%)
  {
      "header": {
          "type": "response",
          "result": 400
      },
      "payload": [
          {
              "header": {
                  "result": 400
              },
              "data": {
                  "status": "insync"
              }
          }
      ]
  }
  </code></pre>