function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
matthew.w.hampton.ax1837matthew.w.hampton.ax1837 

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.

Thanks,

Matt
PrasanntaPrasannta (Salesforce Developers) 
Hi,

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.