javascript - How to disable two button while processing -
hi want disable 2 button while processing. if click button both of them disabled.
i tried code doesn't work :
btnexport.attributes.add("onclick", "this.value='processing...';this.disabled = true; " + clientscript.getpostbackeventreference(btnexport, nothing) + ";" + btnhitung.enabled = false + clientscript.getpostbackeventreference(btnhitung, nothing) + ";") what right code?
better disable buttons on client side instead of server side using jquery @atlay suggested, use fiddle: fiddle disable buttons on click have include jquery library work under solution.
$(document).ready(function() { $("#button1").click(function() { // disabling buttons.. $("#button2").prop("disabled", true); $("#button1").prop("disabled", true); }); }); and if want server side. have put above script function on client side , vb code can call this:
dim script string = "yourfunctionname();" scriptmanager.registerstartupscript(me, me.gettype(), "jscall", script, true) cheers if helps..
Comments
Post a Comment