Link to home
Start Free TrialLog in
Avatar of -Dman100-
-Dman100-Flag for United States of America

asked on

Listen for POST and redirect using window.location

I am working on the Salesforce platform using apex and visualforce and I have a scenario where I'm overriding a button that opens a visualforce page which displays a record using the <apex:detail> component. This component does not let me intercept the save event from the controller.

I had firebug open and I can see the POST and the JSON that is returned. I am wondering if there is a way to use JavaScript to listen for the save and after the save completes, redirect the user to another page using window.location = "the page I want to go to". I would much prefer to do this in the controller, but the particular component does not allow me to catch the save event and redirect. So I have to find another crafty way to handle the redirect.

My javascript skills are such that this one is a bit beyond my knowledge. I was hoping a Javascript guru might have a suggestion on how to do this.

Thanks for any help.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of -Dman100-

ASKER

I got it figured out...thanks.