I want to make the user aware that something is going on when he click the button, I want make the screen to go dim and the waiting cursor shown.
So, in the HTML Element of the button I put something like below in the click event:
Code: Select all
var ok2Continue = 0;
var newDate = $("#clBTUntil").val();
var newChecked = $(".clIsTBA").is(":checked");
var docNo = $("#clAdvanceNo").text();
try
{
$("#clPerDinReqPage").addClass("wait"); //set cursor
ok2Continue = $eb.executeFunction("UntilDateChanged", [newDate, newChecked, docNo]);
if (ok2Continue < 0)
{
if (ok2Continue == -1)
alert("Updating to database, failed!");
else
alert("Cannot send notification email!");
}
}
finally
{
$("clPerDinReqPage").removeClass("wait"); //finish
}
return true;
Code: Select all
.wait
{
cursor: wait;
position:fixed;
top:0;
bottom:0;
left:0;
right:0;
background-color:#fff;
opacity:0.65;
z-index:1001;
}
What should I do to fix it?
Thanks in advance.