Yes I am sure I mucked something up when I took stuff out of the code.

Here is the original

 

<!-- THREE STEPS TO INSTALL SUBMIT ONCE:

 

  1. Copy the coding into the HEAD of your HTML document

  2.  Add the onLoad event handler into the BODY tag

  3.  Put the last coding into the BODY of your HTML document  -->

 

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

 

<HEAD>

 

<SCRIPT LANGUAGE="JavaScript">

 

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

 

<!-- Begin

var submitcount=0;

 

function reset() {

document.emailform.name.value="";

document.emailform.email.value="";

document.emailform.comments.value="";

}

 

function checkFields() {                       // field validation -

if ( (document.emailform.name.value=="")  ||   // checks if fields are
blank.

     (document.emailform.email.value=="") ||   // More validation scripts at

     (document.emailform.comments.value=="") ) // forms.javascriptsource.com

   {

   alert("Please enter your name, email, and comments then re-submit this
form.");

   return false;

   }

 

else 

   {

   if (submitcount == 0)

      {

      submitcount++;

      return true;

      }

   else 

      {

      alert("This form has already been submitted. Thanks!");

      return false;

      }

   }

}

//  End -->

</script>

</HEAD>

 

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

 

<BODY OnLoad="reset()">

 

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

 

<form method=post action="http://cgi.freedback.com/mail.pl"; name="emailform"
onSubmit="return checkFields()">

 

<input type=hidden name=to value="[EMAIL PROTECTED]">

<input type=hidden name=subject value="Feedback Form">

 

<pre>

Your Name:   <input type=text name="name">

Your Email:  <input type=text name="email">

 

Comments?

 

<textarea name="comments" wrap="virtual" rows="7" cols="45"></Textarea>

 

<input type=submit value="Submit Form!">

 

[ Click the submit button twice to see the script in action ]

</pre>

</form>

 

<p><center>

<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com";>The JavaScript Source</a></font>

</center><p>

 

<!-- Script Size:  2.05 KB -->

 

I don't want any of the form checking which is why I tried to trim it out.

Can you tell me how to fix.


<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>

-- 
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


> From: Bill Conlon <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 17 Jun 2003 15:09:13 -0700
> To: <[EMAIL PROTECTED]>
> Subject: Re: Witango-Talk: JavaScript WiTango Help
> 
> generally no, but look at the DOM, as if you're framed you can keep the
> submit count in a window that doesn't get reloaded (i.e., not the missing
> fields window).  It looks like you want this to be a function, no?  Else
> to whom are you returning true/false?

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

Reply via email to