supergrover1981 Posted November 29, 2006 Share Posted November 29, 2006 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 PHPIf 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. :-) Quote Link to comment Share on other sites More sharing options...
btherl Posted November 29, 2006 Share Posted November 29, 2006 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. Quote Link to comment Share on other sites More sharing options...
supergrover1981 Posted December 2, 2006 Author Share Posted December 2, 2006 *grin* Cheers Btherl,I was trying a JavaScript onLoad call that wasn't working - forgot about the fact that my form was inside a small iFrame. JavaScript worked a treat once I realised the mistake. :-)Cheers, - JB Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.