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
asadim2asadim2 

Call actionFunction on page load

Hi,

 

I want to call an actionFunction upon page load and I'm not sure how to do it. The <page> tag has an action attribute but that's only for calling controller methods.

 

Any help is appreciated!

Best Answer chosen by Admin (Salesforce Developers) 
asadimasadim
I solved it by using an actionPoller to call my actionFunction.

All Answers

Ron HessRon Hess

ActionFunction also allows you to call controller methods, so these are basicaly the same thing.

 

 

asadimasadim
Thanks. In my particular actionFunction I am making a recursive call to a controller method (using the oncomplete attribute) and I cannot duplicate this behaviour in my controller without it breaking. That aside my actionFunction calls some javaScript code. That's why I want to call the actionFunction upon page load. Is there a way to do this?
Message Edited by asadim on 12-21-2009 11:27 AM
asadimasadim
I solved it by using an actionPoller to call my actionFunction.
This was selected as the best answer
mridu86mridu86

Even Im having the same issue..Can u please tell me how u did it

 

 

Thanks

Mridu