Jump to content


Photo

Page Not Found?


  • Please log in to reply
3 replies to this topic

#1 LeonardBanks

LeonardBanks
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 March 2006 - 03:21 PM

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.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 28 March 2006 - 03:28 PM

[!--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.

#3 LeonardBanks

LeonardBanks
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 March 2006 - 03:36 PM

My first 8 lines

require("../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;
}
}






#4 LeonardBanks

LeonardBanks
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 March 2006 - 07:40 PM

I normally HATE bumping. But I am in a little crunch. Anyone have any ideas?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users