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
Tan JTan J 

Javascript in place of apex:page action - JS remoting

I want to know if I can use javascript in place of apex:page action. I am implementing js remoting in my vf page. I am going to add @remoteaction before my pagereference method in controller. I also know how to call a @remoteaction method in vf page using javascript for implementing js remoting. However, I am not sure how i can replace action in the apex:page tag which gets called when the vf page loads and performas redirection based on who the logged -in user is (this logic is handled in pagerefernce method in controller).