Hello, I tried a lot and at least was successful. You can try the following
Create an internal library progress_bar with the following code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Progress Bar Example</title>
<!-- Fügen Sie Bootstrap CSS hinzu -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h3>Bitte warten</h3>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<!-- Fügen Sie Bootstrap JS und jQuery hinzu -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<!-- Ihr JavaScript-Code -->
<script>
function updateProgressBar(progressPercentage) {
$(".progress-bar").css("width", progressPercentage + "%").attr("aria-valuenow", progressPercentage);
}
</script>
<!-- Ihr PHP-Code -->
<?php
}
}
function exit_progressbar() {
if ([iss_progress_bar]) {
?>
<?php
}
}
?>
Now you have your RUN-Button oder PHP-Function …
/* The following Link are necessary
If ONE of these links is not available, the progressbar is ignored, but teh controlling program will
do the job.
This works in RunButtons and other parts of Scriptcase
In Runbuttons copy this code in the event and define your program in main_pgm. That's all
*/
// Public Session to store success of link-control
// you should define this variable as
init_progressbar();
main_pgm();
exit_progressbar();
main_pgm is YOUR Code that controls the progressbar.
for example …
for ($i = 1; $i <= 20; $i++) {
update_bar($i,20);
sleep(1);
}
Hope this may help some users …