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

how to show the page is loading on the click of the button in visualforce

i have four tabs developed on my visualforce page with two buttons on each page i.e previous and next button . i want to have a functionality on click of previous and next button to show the user that the page is loading until the page is fully loaded . how can this be done ?

Thanks in advance

Rahul AgarwalRahul Agarwal

In the button use Status tag. For ex:


<apex:commandButton action="{!save}" value="Save" id="theButton" status="counterstatus"/>


then put the following code whereever you want to show the loading image - 


<apex:actionStatus id="counterStatus">
<apex:facet name="start">
<img src="/img/loading32.gif" />


Hit Kudos if this works.



Satish PrajapatSatish Prajapat
Hello All,
 <apex:form id=”formId” >
 <apex:actionStatus id=”status”>
 <apex:facet name=”start”>
 <div style=”position: fixed; top: 0; left: 0; right: 0; bottom: 0; opacity: 0.75; z-index: 1000; background-color: grey;”>
 <div style=”position: fixed; left: 0; top: 0; bottom: 0; right: 0; z-index: 1001; margin: 22% 42%”>
  <img src=”{!$Resource.loader_logo}” width=”80" height=”80" / >
 <apex:commandButton value=”Insert Report” action=”{!insertData}” >
 <apex:actionSupport event=”onclick” status=”status” reRender=”formId” />

Enjoy my Dost...!!!