could you explain how they could both get caught in the false case?
it looks ok to me so just wondering what im missing
----- Original Message -----
From: "John McGowan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 15, 2004 2:43 PM
Subject: Re: Witango-Talk: Select a submit button in a form (OT)
>
>
> Dave Shelley wrote:
>
> >Steve,
> >
> >On your form tag, add onSubmit="return(checkSubmit())"
> >and add a javascript function that says:
> >
> >var submitted=false;
> >function checkSubmit()
> >{
> > if (submitted==false)
> > {
> > sunmitted=true;
> > return true;
> > }
> > else
> > {
> > alert('Already submitted');
> > return false;
> > }
> >}
> >
> >That should do it.
> >
> >
> As long as the Javascript event handlers aren't threaded. If they were
> threaded, both threads could make it into the "if submitted==false" branch
>
> I wouldn't be suprised if the javascript event handlers were threaded,
> because otherwise an infinite loop in one could cause some serious
problems.
>
> /John
>
>
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf