S
Srinivas
Hi,
I have a webform with some dropdown menus, textboxes required and custom
validators. I added a click event handler for the button in which there is
code for processing. This processing takes around one minute.
I want to disable the button after the user clicks on it so that he cannot
click it again while the processing is going on. But when I do this using
javascript, the button is getting disabled while the form is not getting
submitted.
I used btnSubmit.Attributes.Add("onclick", "disablebutton();") to add onlick
event to the button.
When the page is rendered the button html looks like this
<input type="submit" name="btnSubmit" value="Submit"
onclick="disablebutton();if (typeof(Page_ClientValidate) == 'function')
Page_ClientValidate(); " language="javascript" id="btnProceed" />
The javascript for disablebutton() is
function disableButton(){
document.Form1.btnSubmit.value = "Processing..........";
document.Form1.btnSubmit.disabled = true;
}
I don't know where I am going wrong. Can anyone please suggest me how to get
this work.
Thanks
Srinivas
I have a webform with some dropdown menus, textboxes required and custom
validators. I added a click event handler for the button in which there is
code for processing. This processing takes around one minute.
I want to disable the button after the user clicks on it so that he cannot
click it again while the processing is going on. But when I do this using
javascript, the button is getting disabled while the form is not getting
submitted.
I used btnSubmit.Attributes.Add("onclick", "disablebutton();") to add onlick
event to the button.
When the page is rendered the button html looks like this
<input type="submit" name="btnSubmit" value="Submit"
onclick="disablebutton();if (typeof(Page_ClientValidate) == 'function')
Page_ClientValidate(); " language="javascript" id="btnProceed" />
The javascript for disablebutton() is
function disableButton(){
document.Form1.btnSubmit.value = "Processing..........";
document.Form1.btnSubmit.disabled = true;
}
I don't know where I am going wrong. Can anyone please suggest me how to get
this work.
Thanks
Srinivas