You need to sign in to do that
Don't have an account?
Tavva Sai Krishna
Disable custom button which is on detail page.
I have a custom button on detail page of account object whose behaviour is "Execute Javascript" and content source is "onclick JavaScript". My query is how can i disable the button upon click on it.
I have tried with below code but no luck
Also I tried with the prop, and attr methods instead of addClass. does any one has got same error!!!
Thanks and Regards,
Sai Krishna Tavva.
I have tried with below code but no luck
{!REQUIRESCRIPT("https://code.jquery.com/jquery-3.0.0.min.js")} $(this).addClass( 'btnDisabled' );
Also I tried with the prop, and attr methods instead of addClass. does any one has got same error!!!
Thanks and Regards,
Sai Krishna Tavva.
The below script may help you if your content soure is "Onclick Javascript" For the button labelled 'Test' in standard page: ( check button name in page source as below ) Since Salesforce already disables button for the styleclass 'btnDisabled' on standard detail page.
All Answers
The below script may help you if your content soure is "Onclick Javascript" For the button labelled 'Test' in standard page: ( check button name in page source as below ) Since Salesforce already disables button for the styleclass 'btnDisabled' on standard detail page.
var a=document.getElementsByName('disable_me');
a.className='btnDisabled';
a.onclick='';