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:
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.
I have found the source of my problems, it is caused by the following vb.net/javascript code that I am using:
Code:
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.
Last edited by a moderator: