in reply to Re: Netscrape and forms (Slightly Off Topic)
in thread Netscrape and forms (Slightly Off Topic)

Yeah, I was planning on doing that, but I was first wondering if there was a way we could control what the browser itself was sending... (I will be attempting to clean up the javascript code that we currently have anyways, but I was hoping there was a quick fix in Netscape land first.) Thanks Zak
  • Comment on Re: Re: Netscrape and forms (Slightly Off Topic)

Replies are listed 'Best First'.
Re: Re: Re: Netscrape and forms (Slightly Off Topic)
by arturo (Vicar) on Apr 17, 2001 at 20:08 UTC

    You could put an onsubmit attribute in your form tag and have the Javascript in that attribute redirect to a "processing" page (anything that gets you off the current page -- but it would have to be fast to prevent the problem). Or it could set a variable "submitted" that, if true, would disable further submissions.

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

      Actually that is what I currently have. Pesudo code:
      <script language="javascript"> function check (thisform) { if (WhereToGo=="XXX") thisform.submit(); -- other logic here as well else alert("play nice"); } </script> <INPUT TYPE="HIDDEN" name="WhereToGo" Value="XXX"> <INPUT TYPE="Button" name="SomeActionGoesHere" Value="Add something to + form" onClick="check(this);">

      The problem is that double submits are still happening. <GRIPE>(And actually, with IE too... just discovered that bug. Grr. If the world *only* used Opera...)</GRIPE> The only problem with integrating with the database is that the database itself is getting pretty large and to request a new insert database object here takes a few days (or more) to get implemented... Thanks Zak
        Best way to get around that Zak is to expire the page.. so when users try to refresh the page.. it won't re-submit the data.