Page 1 of 1

Help really appreciated: Form caching problem

Posted: Tue Nov 28, 2006 6:21 pm
by supergrover1981
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. :-)
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.

Posted: Tue Nov 28, 2006 6:27 pm
by feyd
That sounds like a browser caching problem. Why do you have Javascript setting a hidden field? What happens if someone has Javascript disabled or just isn't supported?