/    Sign up×
Community /Pin to ProfileBookmark

I am trying to validate my form at my web site [url]www.hbronner.org[/url] . I know very little about javascript, but I am learning. I can read it somewhat, yet not enough to write it. I have downloaded several scripts on validation but can’t seem to get them to work. Can someone lead me to a good script. I’ll try anything. Just what to make sure ppl are filling in all the spaces and have it emailed back to me so I can register them. It’s all free and this is only a hobby to keep me busy. HELP!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Declan1991Oct 25.2007 — Javascript cannot email, only a server-side language can. Instead look up email forms, as there are many that will do it for you.
Copy linkTweet thisAlerts:
@FangOct 25.2007 — To help with the validation we need to see what inputs are required; your site is password protected.

Validation MUST also be done server side.
Copy linkTweet thisAlerts:
@Herb1authorOct 25.2007 — <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<!-- Created with the CoffeeCup HTML Editor 2007 -->

<!-- http://www.coffeecup.com/ -->

<!-- Brewed on 8/20/2007 10:16:39 PM -->

<head>

<title></title>

<div align="center"><b><font size="5"><font color="#0000FF">Membership Sign Up</font></b></div><br><center>A little bit about yourself.</center>

<script language="JavaScript" type="text/javascript">

function validateFields()

{

if (document.membership.firstname.value == "") {

alert("Please Enter Your First Name")

return false

}

if (document.membership.lastname.value == "") {

alert("Please Enter Your Last Name")

return false

}

if (document.membership.email.value == "") {

alert("Please Enter Your Email Address")

return false

}

if (document.membership.Country.value == "") {

alert("Please Enter Country")

return false

}

if (document.membership.State.value == "") {

alert("Please Enter State or Doesn't Apply")

return false

}

if (document.membership.Gender.value == "") {

alert("Please Enter Gender")

return false

}

if (document.membership.agebracket.value == "") {

alert("Please Enter Your Password")

return false

}

if (document.membership.browser.value == "") {

alert("Please Enter Your Browser")

return false

}

if (document.membership.UserName.value == "") {

alert("Please Enter Your User Name")

return false

}

if (document.membership.pw1.value == "") {

alert("Please Enter Your Password")

return false

}

if (document.membership.pw2.value == "") {

alert("Confirm Password")

return false

}

}

</script>

</head>

<body bgcolor="lightblue" onload="document.forms['membership'].reset() >




<center>

<form name="membership"OnSubmit="return validateFields()" action="mailto:[email protected]?subject=Membership Registration" method="post" enctype="text/plain">



<font size="2" color="#ffff66" face="Arial">

<div><table width="50%" bgcolor="#FFFF66" border="7" cellpadding="2" cellspacing="2">

<tr valign="top">

<td><b>First Name:<INPUT NAME="FirstName" TYPE="text" VALUE=""SIZE=20>

</td>

</tr>

<tr valign="top">

<td><B>Last Name: <INPUT NAME="LastName" TYPE="text" VALUE=""SIZE=20>

</td>

</tr>

<tr valign="top">

<td><b>EMAIL:<INPUT NAME="email" TYPE="text" VALUE=""SIZE=20>

</td>

</tr>

<tr valign="top">

<td><b>Country:

<select class="other" name="Country" >

<option></option>

<option>United States</option>

<option>Abkhazia</option>

<option>Afghanistan</option>

<option>United Kingdom Akrotiri and Dhekelia</option>

</select>

</td>

</tr>

<tr valign="top">

<td><b>State(USA only):

<select class="other" name="State" >

<option></option>

<option>AL</option>

<option>AK</option>

<option>AR</option>

<option>AZ</option>

<option>CA</option>

<option>CO</option>

<option>CT</option>

<option>DC</option>

<option>DE</option>

<option>FL</option>

<option>GA</option>

<option>HI</option>

<option>ID</option>

<option>IL</option>

<option>IN</option>

<option>IA</option>

<option>KS</option>

<option>KY</option>

<option>LA</option>

<option>ME</option>

<option>MD</option>

<option>MA</option>

<option>MI</option>

<option>MN</option>

<option>MS</option>

<option>MO</option>

<option>MT</option>

<option>NE</option>

<option>NV</option>

<option>NH</option>

<option>NJ</option>

<option>NM</option>

<option>NY</option>

<option>NC</option>

<option>ND</option>

<option>OH</option>

<option>OK</option>

<option>OR</option>

<option>PA</option>

<option>RI</option>

<option>SC</option>

<option>SD</option>

<option>TN</option>

<option>TX</option>

<option>UT</option>

<option>VT</option>

<option>VA</option>

<option>WA</option>

<option>WV</option>

<option>WI</option>

<option>WY</option>

</select>

</td>

</tr>

<tr valign="top">

<td> <b>Gender:

<select class="other" name="Gender" >

<option></option>

<option>Male</option>

<option>Female</option></select>

</td>

</tr>

<tr valign="top">

<td> <b>Age Bracket:

<select class="other" name="ageBracket" >

<option></option>

<option>Under 18</option>

<option>18-30</option>

<option>31-40</option>

<option>41-50</option>

<option>51-60</option>

<option>over 60</option> </select>

</td>

</tr>

<tr valign="top">

<td> <b>Enter your browser

<select class="Browser" name="browser" >

<option></option>

<option>Internet Explorer</option>

<option>Netscape</option>

<option>Firfox</option>

<option>Opera</option>

<option>Others</option>

</select>

</td>

</tr>

<tr valign="top">

<td> <b>Comments or Suggestion:

<TEXTAREA NAME="COMMENTS" ROWS=5 COLS=50 wrap=yes></TEXTAREA>

</td>

</tr>

<tr valign="top">

<td> <b>User Name(6 to 8 Charaters):

<INPUT NAME="UserName" TYPE="text" SIZE=8><br>

</td>

</tr>

<tr valien="top">

<td> <b>Password:

<INPUT NAME="pw1" TYPE="password" VALUE="" SIZE=8><BR>

</td>

</tr>

<tr valien="top">

<td><b>Confirm Password:

<INPUT NAME="pw2" TYPE="password" VALUE="" SIZE=8><BR>

</td></tr>

<tr><td align="center">


</td></tr></table>

</FORM>

<center>

<INPUT TYPE="submit" value="submit" style="color: #ff0000; background-color: #000000">

<INPUT TYPE="reset" VALUE="Reset" onClick="Reset()"><p>


<font size="4" face="Crazy Loot BTN Inline" color="#FF0000"><b>THANK YOU FOR REGISTERING</b></font>

</body>

</html>

Here is the full page. I took some of the options out to conform to the rules.
×

Success!

Help @Herb1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...