I have a classifieds website, and when users first enter the website a form is submitted on body onload event:
The form is submitted and displays its results in an iframe on the same page.
The problem is that I dont want the submit_form() function to be called everytime the user clicks back or forward in the browser, so how can I prevent the browser from submitting it when using back/forward buttons?
Example:
Form submits when user enters site.
Form shows Search Results in an iframe
User clicks one of the results and new page is displayed
User hits back button to go to the search results again
User finds the form has been resubmitted again, because of body onload triggers
How should I solve this?
Thanks