Solved

Listen for POST and redirect using window.location

Posted on 2016-10-20
2
29 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 51

Accepted Solution

by:
Julian Hansen earned 500 total points
Comment Utility
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-
Comment Utility
I got it figured out...thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now