LeonardBanks Posted March 28, 2006 Share Posted March 28, 2006 Hello all.I am having an issue with a page that contains a form. The form submits to itself.The button used to submit the form is a <button..> with an onclick that validates some data then does a document.frm1.submit(); if all data checks out.I have these headers set:header("Cache-Control: no-store, no-cache, must-revalidate");header("Cache-Control: post-check=0, pre-check=0", false);Header('Pragma: no-cache');My issue is that sometimes, and I cannot recreate regulary, after clicking the button I get a "Page Cannot Be Displayed" error. I click the browser's back button, and all form data is gone, I hit the button and again "Page Cannot Be Displayed". I can hit back and then the button over and over with same "Page Cannot Be Displayed". Now when on the "Page Cannot Be Displayed" if I refresh it first asks if I want to resubmit data, I click yes and the page will load but the data submitted is not there. NOW if I hit back and then hit the button it will submit just fine. The refresh is needed to fix the issue. I have not found a pattern that will cause the "Page Cannot Be Displayed" error.Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/6017-page-not-found/ Share on other sites More sharing options...
trq Posted March 28, 2006 Share Posted March 28, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]if all data checks out.I have these headers set:[/quote]How exactly are you doing this? Javascript runs on the client while php on the server. You'll need to post your code. Link to comment https://forums.phpfreaks.com/topic/6017-page-not-found/#findComment-21611 Share on other sites More sharing options...
LeonardBanks Posted March 28, 2006 Author Share Posted March 28, 2006 My first 8 linesrequire("../connect.php");require("../fun-general.php");require("../func-contractor.php");require("../func_owner.php");header("Cache-Control: no-store, no-cache, must-revalidate");header("Cache-Control: post-check=0, pre-check=0", false);Header('Pragma: no-cache');The button has an onclick event that uses javascript to make sure certain fields are completed. If they are completed then submits.<input onClick="return ButtonSubmit( 'Stay' )" type="button" value="Save">function ButtonSubmit( StayOrReturn ){ ret = true ; if (eval(frm1.days_complete.value)==0 || frm1.days_complete.value=="") ret = false ; if( ret != false ) { alert( "Saving this Cost Breakdown Sheet does NOT submit." ) document.frm1.savecbs.value="Save CBS" document.frm1.float_submit.value="Save CBS" document.frm1.Stay_Or_Return.value=StayOrReturn document.frm1.submit(); } else { return false; }} Link to comment https://forums.phpfreaks.com/topic/6017-page-not-found/#findComment-21614 Share on other sites More sharing options...
LeonardBanks Posted March 28, 2006 Author Share Posted March 28, 2006 I normally HATE bumping. But I am in a little crunch. Anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/6017-page-not-found/#findComment-21706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.