Hello I'm having the same problem from this post:
http://stackoverflow.com/questions/1164251/ajax-beginform-not-hiding-loading-element-when-onbegin-fails but I have not found how to solve it yet.
Basically when I use Ajax.BeginForm with a OnBegin function and this function returns false, the loading elementID is still shown and it never hides again.
This is the code I'm testing it with:
function isValid() {
return false
}
<% using (Ajax.BeginForm("LogIn", "Security", new { ReturnUrl = Request["ReturnUrl"] }
, new AjaxOptions { UpdateTargetId = "resultErrors", OnBegin = "isValid", LoadingElementId = "updatePanel" }))
{ %>