+ Start a Discussion

Back Button Help

Good Morning:

I have a VF page that is hosted on a public site that allows users to create a record (a custom W2L page that goes to a custom lead object).

When the user submits the record, a second VF page, a thank you page pops up alerting the user that their record has been created. I want to put a custom button on the thank you page that the user can hit to return them back to the original page.

I have got this to work using window.open with the primary URL but this opens in a new window and i just want it to open in the same window (ie same function as hitting the back button).

Any help on this is appreciated.


PrasanntaPrasannta (Salesforce Developers) 

I would suggest you to call the below mentioned function on the click of the button -

function myFunction() {
   window.location = "mypage.html";
and try putting URL instead of the page name.