G
Guest
I have an ASP.NET page that has a few buttons on it. One of the buttons
kicks off a long running process on the web server and I want to prevent the
user from clicking the button again while the long running process is working
(i.e. before the page completes it's "postback").
I tried something like so, but it didn't work:
<script language="javascript">
function confirmWinnerSelection(myBtn){
if (confirm('Are you sure?')) {
myBtn.disabled = 'diabled';
return true;
}
else
{
return false;
}
}
</script>
Then in my button's OnClick event I have the following:
OnClick="javascript: return confirmWinnerSelection(this);"
I think because I am disabling the button before the submission actually
take's place, it is not performing the postback. Is there anyway to get
around it???
kicks off a long running process on the web server and I want to prevent the
user from clicking the button again while the long running process is working
(i.e. before the page completes it's "postback").
I tried something like so, but it didn't work:
<script language="javascript">
function confirmWinnerSelection(myBtn){
if (confirm('Are you sure?')) {
myBtn.disabled = 'diabled';
return true;
}
else
{
return false;
}
}
</script>
Then in my button's OnClick event I have the following:
OnClick="javascript: return confirmWinnerSelection(this);"
I think because I am disabling the button before the submission actually
take's place, it is not performing the postback. Is there anyway to get
around it???