Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (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 by mike55

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...