Jump to content

Help really appreciated: Form caching problem


supergrover1981

Recommended Posts

Hi Guys,

I'm currently having a problem with a GET submission. If anyone has any suggestions I'd be most appreciative. Here's the problem:

I'm working on a site which, on the front page, has a hidden input field declared with value="any". This value can be changed by a javascript call of onclick="basicsearch.primarycolour.value='xyz'"

The form works fine, but if I go back to the same submission page (even after pressing refresh) without first shutting down the browser, it posts the remembered value of the hidden form, NOT the default value set in the (input name=xyz value="any") html.

If I click on a javascript button which sets a different value via onClick it posts the new value, but unless i do that, the page seems to ignore the value set in the input field.

A few things:

- My PHP includes no session variables
- The screen with the form in it does not receive any _GET/_POST variables from other pages
- No cookies set in my PHP

If anyone has any idea on how to make these pesky forms "forget" the previous submission, I really would be most appreciative - it's doing my head in. :-)
Link to comment
Share on other sites

That's the browser doing that.. one way to fix it is to make sure your users fetch the page again, rather than going back in the browser.  You can force that by getting the browser not to cache the pages (I'm not sure of the mechanism to do that).

If you want to solve it in the browser itself, look at javascript rather than php.  And don't trust IE for refreshing pages.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.