+ Start a Discussion
sadasiva07sadasiva07 

How to run Javascript method before methods in controller

Hi,

 

Im implementing one method in controller which is used as extension for a page, in the controller I a method which returns a pagereference.

 

And in the Page I have one JavaScript fiction which displays a alert messages.

 

But here that alert message was not working because first controller methods are executing first so that the js methods in page is not calling,.

 

is their any alternate way to execute the js methods first after that only controller methods.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
VJSFDCVJSFDC

hi,

Have you tried using apex:actionFunction in the VF page.