Hello, friends!
I have a trouble with disabling the button after first click and clicent validation.
I found some solutions, but only one works fine. This solution from Angus Logan - http://msmvps.com/blogs/anguslogan/archive/2004/12/22/27223.aspx
A put this code to may page:
1 StringBuilder sbValid = new StringBuilder();
2 sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { ");
3 sbValid.Append("if (Page_ClientValidate('ResumeEdit') == false) { return false; }} ");
4 sbValid.Append("this.src = '/images/wait.gif';");
5 sbValid.Append("this.disabled = true;");
6 sbValid.Append("document.all." + btnSend.UniqueID + ".disabled = true;");
7 sbValid.Append(Page.ClientScript.GetPostBackEventReference(btnSend, btnSend.ID));
8 sbValid.Append(";");
9 btnSend.Attributes.Add("onclick", sbValid.ToString());
It works fine in IE, but not works in Firefox.
After click on button it disables and change image, and form submit to server. But event btnSend_Click not raised - only Page_Load method works. This problem in Firefox, in IE all works fine.
Please help me resolve this problem.
Thank you very much!
Sorry, my English is bad. I can read, but i can't write good ;)