Several ways to do that. Here is a simple one.
set buffering off.
Start your response HTML and body and use tables or something to create the progress bar. I have used DIV elements with 'width' attributes in IE.
begin your background process.
begin a loop with a wait() or sleep() depending on how you implement your background process thread.
when your wait/sleep ends get your progress from the backgound process then write a HTML SCRIPT element containing line(s) of code that update the width of the progress bar element that you already sent.
Continue until background progress completes.
Send the remainder of the page, i.e. a completed message, then send another script element that hides the progress bar and shows the message element.
Hope this helps
-pete