You can do something like...
when the php script starts, set a session variable to 0 (0%)
while the php script runs, change that number (0 -> 100%)
meanwhile, ANOTHER PAGE shows the progress bar
using javascript it requests a 3rd php page which returns the session variable
again using javascript, the scrollbar is updated.
Example (in my-code = non-existing language)
do-something-page.php
Code:
$_SESSION["prog"] = 0;
for(blahblah) {
$_SESSION["prog"]++;
}
pageThatIsCalledByJavascript.php
statusbarPage.php
Code:
<html blahblah>
<script>
ProgressBar status = new ProgressBar();
status.value = 0;
setTimeout(update, 1000);
function update() {
newstatus = getPageContents("pageThatIsCalledByJavascript.php");
status.value = newstatus;
}
</script>
<3 me-code ;p
- Marshian