You need to sign in to do that
Don't have an account?

Disable search button when search button is clicked
Hi All,
Urgent help needed.
I am new to Salesforce and need your guidance to grey out the GO button. When the GO button is clicked, the button immediately greys out and prevent the user from clicking the button multiple times. GO button is calling a method called Search in a custom controller.
<apex:commandButton id="btnGo" value="{!$Label.Go}" action="{!Search}" rerender="searchResults">
Request you to please share your advice if we can grey out the button or put some fancy text that "Search is happening" until the result comes out.
Regards,
Vinay
Urgent help needed.
I am new to Salesforce and need your guidance to grey out the GO button. When the GO button is clicked, the button immediately greys out and prevent the user from clicking the button multiple times. GO button is calling a method called Search in a custom controller.
<apex:commandButton id="btnGo" value="{!$Label.Go}" action="{!Search}" rerender="searchResults">
Request you to please share your advice if we can grey out the button or put some fancy text that "Search is happening" until the result comes out.
Regards,
Vinay
All Answers
Thanks for your Quick reply.
I tried your way but it's not working. It not even showing any result on GO button click.
Can you please suggest me any other way to fix this.?
Regards,
Vinay
I tried it again and GO button is getting disabled permanently. if the user wants to click on GO button again, its greyed out.
Please suggest.
Regards,
Vinay
Is your Search based on certain criteria, I meant do you have input fields. You can make it enables if someone change the criteria.
I have the below lookup box where I have two search filter. Here the Go button is getting permanently disabled and it does not allow the user to put any value.
Any suggestion?
Yes, the search is taking the longer time to pull the result. Hence I wanted to grey out the button until the result display in the screen.
The search result comes after running 6-7 SOQL queries. Thus it takes longer time. Therefore I wanted to restrict the user to not to click again during the search is happening in the background.
I hope you understand my requirement. Kindly suggest me to achieve this easily.
Thanks, it worked fine!!