function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
djfubardjfubar 

Loading Animation on JavaScript button click

Hi,

 

I have a a custom button on a lead record which currently executes some JavaScript. Is it possible to add a loading animation gif whilst the JavaScript is processing? Or is there a different way to do this?

 

Thanks

sfdcfoxsfdcfox

Assuming the type is "Execute JavaScript", you could use any loading GIF that you feel would work. Just add a DIV to the body with a high zIndex (100, preferably), and the image contained within it. Once done, just remove the DIV from the DOM.