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
KrisGopiKrisGopi 

VIsualForce

any example code How to use Onsubmit.oncomplete in ActionPoller in visualforce any example that use all attributes in one example 
bmabma

This is an example taken from the Visualforce Developer's Guide with a few attribute added:

 

<apex:page controller="exampleCon"> <apex:form> <apex:outputText value="Watch this counter: {!count}" id="counter"/> <apex:actionStatus startText=" (incrementing...)" stopText=" (done)" id="counterStatus"/> <apex:actionPoller action="{!incrementCounter}" rerender="counter" interval="5" id="poller" enabled="true" status="counterStatus" timeout="500" oncomplete="alert('Action is complete');" onsubmit="alert('Acton is submit');"/> </apex:form> </apex:page>

 

- if the action, incrementCounter, takes longer than 500ms, a timeout would occur.

- before the action is called, you would receive an alert with the text 'Action is submit'

- when the action is complete, you would receive an alert with the test 'Action is complete'

 

Hope this helps.