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

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Netscrape and forms (Slightly Off Topic)
by zakzebrowski (Curate) on Apr 17, 2001 at 21:12 UTC
    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.
        True, but that is not the correct context. This is happening when you hit submit once, not multiple times. Therefore, this is implying something that one can easily catch, other than unique form variables and session locking...