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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -