Try this.

Set a Witango variable at the top of the main submit result page

<@ASSIGN user$SubCnt VALUE=0>

in the JS 
<SCRIPT LANGUAGE="JavaScript">
 
 
<!-- Begin
var submitcount= @@user$SubCnt;
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      alert("This form has already been submitted.  Thanks!");
      return false;
      }
 
//  End -->
</script>

Because the JavaScript is client side you need a link between Witango
and JS

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm 
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm


-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2003 2:52 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: JavaScript WiTango Help

I am trying to prevent users from submitting this form twice but I am
still
using the missing fields action in Witango to catch missing fields.

So two questions.

One will this work even after they hit submit and get the missing fields
message? If not is there a way to reset the counter when the hit the
back
button on the missing fields result page?

2. I have something messed a little in the syntax here I am sure because
I
took this code out of one that also did some validation that I didn't
need.


<SCRIPT LANGUAGE="JavaScript">
 
 
<!-- Begin
var submitcount=0;
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      alert("This form has already been submitted.  Thanks!");
      return false;
      }
 
//  End -->
</script>

Thanks
-- 
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to