im doing a project for a class in school and i need hbelp on the email check, xipcode check, the radio button and phone PLEASE help me out here is my little project so far:
<html>
<title>Buy-a-Penguin.com</title>
<head>
<center><h2>
Welcome to Buy-a-Penguin.com, Please fill out the form below <br>to get started on adopting your own penguin!
<br><br><BR>
</head>
<body bgcolor=”white”>
<form method=”post” action=”mailto:
<table border=”4″>
<td>
First Name:<input name=”Fname” type=”text” size=”10″ maxlength=”10″><br>
Last Name:<input name=”Lname” type=”text” size=”10″ maxlength=”10″><br>
</td>
<td>
Street Address:<input name=”Adress” type=”text” size=”20″ maxlength=”20″><br>
</td>
<td>
Home Phone Number<input name=”Phone Number” type=”text” size=”12″ maxlength=”12″><br>
(ex: xxx-xxx-xxxx)
</td>
<td>
</td>
</tr>
<tr>
<td>
Zip Code<input name=”Zip Code” type=”text” size=”10″ maxlength=”10″><br>
</td>
<td>
Country<input name=”Country” type=”text” size=”10″ maxlength=”10″><br>
</td>
<td>
Pick a color for your new Penguin
<select name=”Color”>
<option>Please Pick A Color </option>
<option>Green </option>
<option>Yellow</option>
<option>Pink</option>
<option>White</option>
<option>Orange</option>
<option>Red</option>
<option>Brown</option>
<option>Blue</option>
<option>Normal(Black and White)</option>
</td>
<tr>
<td>
<align=”center”>What eles would you want with your order?<br>
<input type=”checkbox” name=”1″ value=”interest1″>Internet
<br>
<input type=”checkbox”name=”2″ value=”intest2″>Fish(1lb=$9.99)
<br>
<input type=”checkbox” name=”3″ value=”interest3″>Inground water temp pool(1gl=$29.99)
<br>
<input type=”checkbox”name=”4″ value=”other”>Slide into pool($79.99)
</td>
<td>
<center>
What gender do you want your penguin to be?:
<br>
<input type=”radio” name=”radio1″ value=”Radio” onClick=”0″>Male
<input type=”radio” name=”radio1″ value=”Television” onClick=”0″>Female
</td>
<td>
fghdfhgdfghdfgh
</td>
</tr>
</table>
<script>
function isCharNumeric(passedVal) {
if (passedVal < “0”) {return false;}
if (passedVal > “9”) {return false;}
return true;
}
function isStringNumeric(passedVal) {
for (i=1; i < 3; i++) {
if (!isCharNumeric(passedVal.charAt(i))) return false;
}
for (i=5; i < 7; i++) {
if (!isCharNumeric(passedVal.charAt(i))) return false;
}
for (i=9; i < passedVal.length; i++) {
if (!isCharNumeric(passedVal.charAt(i))) return false;
}
return true;
}
function validphone(Phone Number) {
if ((Phone Number == “”)||( Phone Number.length != 12)) {return false;}
if (isStringNumeric(Phone Number)) {
return true;
}
return false;
}
function submitIt(form) {
if (!validphone(form.phone.value)) {
alert(“That is an invalid Phone Number”)
form.phone.focus()
return false;
}
return true;
}
</script>
<input type=”submit” value=”Submit” onSubmit=submitIt(form)>
</form>
</body>
</html>
Can you please make it work so far and add the email check, zipcode, phone number, and checkbox! PLEASE PLEASE PLEASE! i have no idea of what to do?!?!??!?!??!?!?!