Removing progress bar, after 100% processing
Posted: Sun Sep 13, 2009 3:19 pm
In this code I am using CSS to show the progress of the execution, but after 100% execution of the program, I want to hide the progress indicator from the page. How can i do that....
here is my code
CSS CODE
PHP CODE, the colored code is for the progress indicator, I want to hide the progress indicator after 100% processing, Any help is highly appreciated.
I am new to the PHP programming, so this might be a stupid question, but any help is highly appreciated.
Thanks in Advance.
here is my code
CSS CODE
Code: Select all
<style>
.progress_wrapper {width:295px;border:1px solid #ccc;position:absolute;top:360px;left:20%;margin-left:-150px}
.progress {height:20px;background-color:#000}
</style>
Code: Select all
$query = "Select employee_id, employee_first_name, employee_last_name, employee_city, employee_state, employee_phone from champion_db.employee where employee_is_deleted = 0 and branch_id = '". $branch . "' ORDER by employee_first_name";
$result = pg_query($query);
$count = pg_num_rows($result);
//echo "count is".$count;
if (!$result) {
echo "Problem with query " . $query . "<br/>";
echo pg_last_error();
exit();
}
[b]// THE CODE FOR THE PROGRESS BAR STARTS HERE [/b]
$width = 0; // the starting width
$width_per_iteration = 300 / $count; // how many pixels should the progress div be increased per each iteration
ob_start();
while($myrow = pg_fetch_assoc($result)) {
echo '<div class="progress_wrapper"><div class="progress" style="width:' . $width . 'px;"></div></div>';
$width += $width_per_iteration;
ob_flush();
flush();
// I OMITTED THE CODE FOR THE PROCESSING...
}}
Thanks in Advance.