Solved

Listen for POST and redirect using window.location

Posted on 2016-10-20
2
63 Views
Last Modified: 2016-10-29
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.
0
Comment
Question by:-Dman100-
2 Comments
 
LVL 56

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41853425
Maybe someone with SF experience can chip in - if not then without being able to see the page - difficult to answer
0
 

Author Closing Comment

by:-Dman100-
ID: 41865403
I got it figured out...thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Debugging Html 8 31
arrays and radio buttons 10 39
Slush on text 2 11
ExcelWebAddIn Connect to SQL database (Javascript or VB.net) 7 18
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question