Welcome Guest, Not a member yet? Register   Sign In
go back to a page with a form and bypass browser prompts

i have a page with a form. its basically a search page where users can put keywords and shown results.

if they select an item on the results they are taken away from that search page.

my problem now is when they are in the results page and wanted to go back, either by pressing the back button on the browser or using JavaScript to the search page populated with the previous results, browsers will display a popup saying something like

"To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier."

i understand that this is a security feature on all browsers however this is not a secure page and its just a search page so i want to bypass this for user accessibility.

any ideas?

My personal solution goes like this:

1) all forms submit to the submit() method of the controller. They are switched on the form id or submit id and processed
2) then they redirect to the proper method to handle the display of the new page.

Here's an example:

class units extends MY_Controller {
  function __construct() {

  function index() {

  function submit() {
    if($this->input->post('search_filter')) {
//bunch of processing in this case just cleaning the vars and sending them to the redirect below...

The form's action is sent to the units/submit path, and it handles it from there.

With this setup I avoid that annoying browser message, and in this specific case provide a unique url for each possible search combination... something my SEO geek said is good Smile

Theme © iAndrew 2016 - Forum software by © MyBB