+ Start a Discussion

How to show loading image while Ajax call in Visualforce?

Hi Developers , 


Can anyone help me in resolving this issue ?


ERROR : the image is not getting display in a page .


How to show loading image while Ajax call in Visualforce? OR how to show image in <apex:actionStatus> tag in Visualforce?


<apex:page >
 <div style="position:absolute;top:20px;left: 50%;">
      <apex:actionStatus id="refreshContent" >
             <apex:facet name="start" >
               <apex:image url="{!$Resource.waterlilies}" />


Thanks in Advance



Assuming your resource exists.

The content of your actionStatus tag will show when you reference it from for example an actionPoller or actionSupport.
The actionSupport tag in the example below is placed within a apex:selectList tag.


<apex:actionSupport action="{!someAction}" event="onchange" reRender="someBlock" status="refreshContent"/>

 When selecting something in this list, the apex:image will display while loading.


// Niklas