Solved

Listen for POST and redirect using window.location

Posted on 2016-10-20
2
69 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 57

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
arrays and buttons with user input 2 42
Make New Browser Window Fully Functional 7 36
Jquery Calculation 3 43
Drag & Drop Error 5 33
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
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

752 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