Validation of Form with JScript

Results 1 to 2 of 2

Thread: Validation of Form with JScript

  1. #1
    Join Date
    Dec 1969

    Default Validation of Form with JScript

    Hi Folks,<BR><BR>I have this form which contains the typical information.<BR>This form is mailed to an email address.This is taken care of by mailto of HTML.<BR>validateForm function validates some required fields like name,phone,address.<BR><BR>My Code is as follows.<BR><BR>&#060;form METHOD="POST" action="/MailForm/MailFormHandler.asp" name="frmMain" onSubmit="return(validateForm(this));"&#062;<BR>&# 060;td align="right" valign="middle"&#062;&#060;/td&#062;<BR>HTML Code for Form Input Fields(eg. name,email,street address,phone etc.)----<BR>----<BR><BR>&#060;td&#062;&#060;input type="submit" value="Send Request&#062; &#060;input type="reset" value="Clear Form"&#062;&#060;/td&#062;<BR>&#060;/form&#062;<BR>My problem is I want to clear the contents of my form after submitting it,so that when a user presses Back button s/he will have a clear form with no values.But the values should be received in email to the email address specified in mailto<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Validation of Form with JScript

    after you send the mail on your mailer page, use a response.redirect() back to the form, the values should be cleared.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts