---
schema_version: "1"
id: 63d270e6faf383c63647df23476617733344627aef74d151371bbc9958bb66de
title: Provide Status for Asynchronous Operations
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/quick-start/pages-quick-start-ajax-async-status.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-quick-start-ajax-async-status.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b8642cfe5c90b21e862ee505f3ffe63f7c8d3bfb1b9704f98e843cae58700b93
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Provide Status for Asynchronous Operations

Ajax behaviors, such as partial page updates, are asynchronous events that occur in the background while a user continues to work. With the `<apex:actionStatus>` component, you can display status messages that alert the user of any background activity currently in progress.

The `<apex:actionStatus>` component displays a status message at the beginning or end of a background event with the `startText` or `stopText` attributes. It can also display an image or other component.


## Example

The example Visualforce page shows a list of an account’s contacts. After a user clicks a contact’s name, the detail area displays the status message “Requesting...” until the contact’s details render.

The `<apex:actionStatus>` component’s `startText` attribute is set to the text displayed at the start of the Ajax request.

The `id` attribute allows other components to reference the `<apex:actionStatus>` component. Because the `<apex:commandLink>` component initiates the Ajax request, its `status` attribute is set to the `<apex:actionStatus>` component’s `id`.

`<apex:actionStatus>` supports the `<apex:facet>` component. The `<apex:facet>` component’s `name` attribute is set to `stop`, which indicates that the status message displays until the component nested inside the facet component renders. In this example, that component is `<apex:detail>`, which shows the chosen contact’s details.

```apex
<apex:page standardController="Account">
    <apex:pageBlock title="Hello {!$User.FirstName}!">
        You are displaying contacts from the {!account.name} account. 
        Click a contact's name to view his or her details.
    </apex:pageBlock>
    <apex:pageBlock title="Contacts">
        <apex:form>
            <apex:dataTable value="{!account.Contacts}" var="contact" cellPadding="4" 
                               border="1">
                  <apex:column>
                      <apex:commandLink rerender="detail" status="detailStatus">
                          {!contact.Name}
                          <apex:param name="cid" value="{!contact.id}"/>
                      </apex:commandLink>
                  </apex:column>
            </apex:dataTable>
        </apex:form>
    </apex:pageBlock>
    <apex:outputPanel id="detail">
        <apex:actionStatus startText="Requesting..." id="detailStatus">
            <apex:facet name="stop"> 
                <apex:detail subject="{!$CurrentPage.parameters.cid}" 
                             relatedList="false" title="false"/>
            </apex:facet>
        </apex:actionStatus> 
    </apex:outputPanel>
</apex:page>
```

When you visit this page, include an account id as part of the URL, for example `https://MyDomainName--c.vf.force.com/apex/ajaxAsyncStatus?id=001x000xxx3Jsxb`.

**See Also**  


-   [Best Practices for Using Component Facets](https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/best-practices/pages-compref-additional-facet.md)

