This topic is locked

Simple "Please wait" message for long running operations

1/18/2023 11:19:36 AM
PHPRunner Tips and Tricks
admin

The same code will work for all PHPRunner, ASPRunner.NET and ASPRunnerPro.

Lets say we have a button, where we perform some long running operation and need to tell user that they need to wait. We show 'Please wait message in Client Before event of the button and hide it in Client After event.

img alt

Here is the code.

Client Before event

$("body").addClass("body_overlay");
$("<div id='myloading' class='custom_loading'>Please wait...   <img src='images/loading.gif'></div>").insertAfter($("body"));
$("#myloading").css("top",($(window).height() - $("#myloading").outerHeight())/2);
$("#myloading").css("left",($(window).width() - $("#myloading").outerWidth())/2);

Client After event

$("body").removeClass("body_overlay");
$("#myloading").remove();

Style Editor --> Modify CSS

.body_overlay{
background-color:#9c9c9c;
position: fixed;
width: 100%;
height: 100%;
z-index: 1000;
top: 0px;
left: 0px;
opacity: .5; /* in FireFox */
filter: alpha(opacity=50); /* in IE */
pointer-events:none;
}
.custom_loading{
position:absolute;
border:1px solid lightgray;
background-color:white;
z-index:9999;
padding:20px 50px;
font-size:14px;
}
P
ppradhan@live.com 1/18/2023

wow, this is a good example. Can we adopt same thing in the list page when it takes few seconds to load the table?