ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Javascript back resubmitting form - help!!!

October 25, 2007 3:39pm

Subscribe [1]
  • #1 / Oct 25, 2007 3:39pm

    julie p

    282 posts

    I have a form that uses the category name to feed a hidden field.  the results page does NOT know that category.

    I need to have a “back” button to go back from the search results page to the search page.  I’ve chosen the javascript function as such:

    <a href=”#” onClick=“history.go(-1)”>[image here]</a>

    this takes me back to page no problem - but it resubmits the form!!! how can I keep that from happening?  I need to go back and remember the previous state.  Is there a referrer or previous url I can grab that won’t resubmit that page?

    thanks!

    [Mod Edit: Moved to the How To forum.]

  • #2 / Oct 25, 2007 4:45pm

    julie p

    282 posts

    ok - i solved the problem by using php session variables and passing along the category in the session.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases