How do I update the value of a progressbar when using .ajax?

How do I update the value of a progressbar when using .ajax?

Hello all,
I have a simple php form page and I wish to update a MySQL database on a button click.  When I click the button, I want the progressbar to appear and reflect the status of the database update or query.

In the simple page, I have the following..

<div id="progressbar"></div>

<input type="button" class="btn" value="click to update" onclick="updateDB(id);" />

My javascript looks like this...

function updateDB(id){
      $("#progressbar").progressbar({value:0});

      $.ajax({
            url:'updatedb.php',
            data:'id='+id,
            success:function(){
                  alert("success");
            }
      });
}

My "updatedb.php" is just a update query to the database.

The ajax request performs successfully. But I'm not sure how to update the progressbar value.

Thanks for any help with this.

John