The most simple way and effective and used in most programs to implement the following steps :
1- Lock the screen; Javascript type
2- Style (CSS for LockOn and LockOff): show the cursor status. If LockOn, the cursor's status is "wait". If LockOff, the cursor's status is "Default"
3- OnclientClick to connect with the server and run java with CSS lockOn
4- div for lockoff after finishing the connection with the server
5- That's all
'1- First Step
<script type="text/javascript">
function skm_LockScreen(str)
{
var lock = document.getElementById('SecrrenLock');
if (lock)
lock.className = 'LockOn';
lock.innerHTML = str;
}
</script>
'2- Second step
<style type="text/css">
.LockOff {
display: none;
visibility: hidden;
cursor:default;
}
.LockOn {
display: block;
visibility: visible;
cursor: wait;
}
</style>
3- Third Step: ButtonX: Click the button to connect with the server or database
onclientclick="SecrrenLock('Write what you want:Please, Wait');"
4-Fourth Step: Disconnecting and screen back active
<div id="SecrrenLock" class="LockOff"></div>