mike55 Posted January 7, 2008 Posted January 7, 2008 (edited) I am using the ajax control toolkit update panel for a site. I have noted that when users use my site with the Mozilla browser and click on one of the buttons in the update panel that a double postback occurs. I have been unable to trace the source of this problem and I have been unable to replicate it in IE 6.0. Has anyone come across this problem before? I have found the source of my problems, it is caused by the following vb.net/javascript code that I am using: 'Prevent the user from double clicking on the save button. Private Sub PreventDoubleClick() Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder() sb.Append("if (typeof(Page_ClientValidate) == 'function') { ") sb.Append("if (Page_ClientValidate() == false) { return false; }} ") sb.Append("this.value = 'Please wait...';") sb.Append("this.disabled = true;") sb.Append(Page.GetPostBackEventReference(btnSave)) sb.Append(";") btnSave.Attributes.Add("onclick", sb.ToString()) End Sub I am using the above code to prevent the user from being able to double click a button. The button itself is sitting in a ajax update panel. Interesting problem. Mike55. Edited January 7, 2008 by mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.