Javascript : Change the function of the browser's back button
You can't override the behaviour that if a user follows a link to your page, clicking Back will take them off it again.
But you can make JavaScript actions on your page add entries into the history as though they were clicks to new pages, and control what happens with Back and Forward in the context of those clicks.
There are JavaScript libraries to help with this, with Really Simple History being a popular example.
Change back button functionality in browser using jQuery
I think you can set a session variable on your form in http://website.com/page3.php. and then unset it once the submission is done in http://website.com/page3.php?ok=ok.
and each time the page with the variable in the url is loaded, check immediately for the submission session variable to see if you are redirected to the page from the form page. and if not, redirect you back to the page3.page.
I hope I made myself clear enough!
Related Topics
Create a Newline for Every X Number of Characters
How to Detect Overflow of React Component Without Reactdom
React Open Modal Window on Click in Another Component
Disabling a Button Within a Stateless Component - React
How to Add Spaces to for Loop Output in JavaScript
How to Fix Problem Closing Dropdown When I Click Outside It
Can We Call the Function Written in One JavaScript in Another Js File
How to Separate an Integer into Separate Digits in an Array in JavaScript
How to Align Text Input Correctly in React Native
How to Increment a Number After Every 1 Second Using JavaScript
Generate a Weighted Random Number
Get the Value of Datepicker on Change in Jquery
If Check Box Checked Disable Other, If Unchecked Enable All in React
To Check If a String Is Alphanumeric in JavaScript
Get Count of True Values in Json With JavaScript