How to disable a WebButton

So how come I can set the function for the onclick event, but not disable the button??? Here is my code:

Self.ExecuteJavaScript "document.getElementById(""" + LoginButton.ControlID + """).onclick=function() { alert('You clicked it.'); };"
Self.ExecuteJavaScript "document.getElementById(""" + LoginButton.ControlID + """).disabled=true;"

Because there’s a lot more happening behind the scenes when you use myButton.Enabled in Xojo then simply changing the JavaScript property disabled (if Xojo even makes use of that property on the client side). Don’t try to do this in JavaScript. Do it in Xojo: LoginButton.Enabled = False

I was afraid of that and no I do not want to do it serve side.

Are you concerned about visual feedback delay or are you trying to prevent double execution of your login code? If the latter that’s easy to solve.

Actually neither at the moment, I’m just exploring the possibilities…