[RESOLVED] Disable Button on Submit
This is working:
Code:
cmdSave.Attributes.Add("Onclick", "this.style.visibility = 'hidden';return confirm('Confirm?')")
When i choose the yes option the postback is made
But i would like to disable the button instead of hide it.. but the following does not work...
Code:
cmdSave.Attributes.Add("Onclick", "this.disabled = true;return confirm('Confirm?')")
When i choose the yes option nothing happens
Any help ???
Thx in advance
Re: Disable Button on Submit
You can reduce the opacity (with CSS) on the button when submit occurs. This way the user wont get surprised on a disappearing button but get alerted that there is some validation going on.
Re: Disable Button on Submit
solved
Code:
<asp:Button ID="cmdSave" runat="server" Text="Teste" OnClientClick="if (!confirm('Certain??')) return;this.disabled=true;this.value = 'Please wait ...';" UseSubmitBehavior="false"/>