You need to sign in to do that
Don't have an account?
Chamiz
Disable both top and bottom "pageBlockButtons" using JavaScript
I found a problem with disabling both top and bottom "pageBlockButtons" in a VF page. When I am using JavaScript to disable the buttons only top pageBlockButtons are disabled.
Here is my JavaScript
this.btnMailSubmit.disabled = true;
this.btnMailSubmit.className = 'btnDisabled';
and the VF code for pageBlockButtons
<apex:pageBlockButtons id="submitButtons" > ............. <apex:commandButton id="btnMailSubmit" value="Help Me" action="{!send}" onClick="return onDataFormSubmit();" /> </apex:pageBlockButtons>
Can you help me on this?
I found the solution for this
function btnDisable(){ var theForm = window.document.forms[FormName]; for(i=0; i < theForm.elements.length; i++){ if (theForm.elements[i].type == "submit"){ if (theForm.elements[i].disabled == false) { theForm.elements[i].disabled = true; theForm.elements[i].className = 'btnDisabled'; } } } }