That's not really what I want

http://pub.alxnet.com/guestbook?id=2000000

(this one works)

does it without. 

On my page I am using a child window to reload the parent window
, so your solution can't be used unfortunately.

Bolke

-----Oorspronkelijk bericht-----
Van: Jon Haworth [mailto:[EMAIL PROTECTED]]
Verzonden: Tuesday, March 06, 2001 2:01 PM
Aan: Bruin, Bolke de; [EMAIL PROTECTED]
Onderwerp: RE: [PHP] no-resubmit on reload/refresh


Javascript? (I know it's generally horrible, but it's good for this sort of
thing)

Stick this in your <head>...</head>:

  <script language="JavaScript" type="text/javascript"><!--Begin
  var submitcount=0;
  function jsCheck() {
          if (submitcount == 0) {
             submitcount++;
             return true;
          } else {
             alert("This request has already been submitted, please wait
while it is processed.");
             return false;
          }
  }
  //End--></script>

And call it from your form like this:

<form name="myform" action="whatever" method="post" onSubmit="return
jsCheck()">

Voila.

HTH
Jon



-----Original Message-----
From: Bruin, Bolke de [mailto:[EMAIL PROTECTED]]
Sent: 06 March 2001 12:53
To: [EMAIL PROTECTED]
Subject: [PHP] no-resubmit on reload/refresh



I have a form which is submitted by a POST action.

After submitting, the same page (updated though) returns
with the form. (It's a messageboard)

Now when someone refreshes/reloads the page they get the
question if they want to resubmit the form.
I don't want that. You get double posts this way.

I know it is possible to check the input for any duplicates,
but for example this guestbook http://pub.alxnet.com/guestbook?id=120611

(hope the id works) does it differently and your browser does
NOT if you wnat to resubmit, it just doesn't do it.

Anyone knows how this works (HTTP header maybe?)

cheerz
Bolke


**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**********************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to