Solved

Listen for POST and redirect using window.location

Posted on 2016-10-20
2
76 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-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…
Suggested Courses

623 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