Code:
<script>
/*
Check required form elements script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/
function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,8)=="required"){
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("One or more of the required elements are not completed. Please complete them, then submit again!")
return false
}
else {
var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
var returnval=emailfilter.test(which.requiredemail.value)
if (returnval==false){
alert("Please enter a valid email address.")
which.requiredemail.select();
return false;
}
return true
}
}
</script>
Script in the body section
<form method="post" onsubmit="return checkrequired(this)" enctype="multipart/form-data" action="http://pub32.bravenet.com/emailfwd/senddata.php">
<b><font color="#006600"><input name="usernum" value="2704960386" style="border: 0px solid rgb(0, 0, 0); width: 0px; height: 0px;" type="hidden">
<input name="cpv" value="2" style="border: 0px solid rgb(0, 0, 0); width: 0px; height: 0px;" type="hidden">
<!-- DO NOT CHANGE OR REMOVE THE 3 TAGS ABOVE THIS COMMENT-->
</font></b><div align="left"><label for="thankyou" style="display: none;"><b><font color="#006600">hidden field</font></b></label><b><font color="#006600"><input value="http://fengshuihope.bravehost.com/download1.htm" id="thankyou" name="thankyou" style="border: 0px solid rgb(0, 0, 0); width: 0px; height: 0px;" type="hidden"></font></b><div style="clear: left; height: 20px; display: none;"><b><font color="#006600"> </font></b></div>
<table border="0" cellpadding="0" cellspacing="3">
<tbody><tr>
<td><strong>Name: </strong></td>
<td><input name="requiredname" size="35" type="text"> <font color="#ff0080">*</font></td>
</tr>
<tr>
<td><strong>Country:</strong></td>
<td><input name="requiredcountry" size="48" type="text"> <font color="#ff0080">*</font></td>
</tr>
<tr>
<td><strong>Email:</strong></td>
<td>
<font color="#006600"><b><input name="requiredemail" size="63" type="text"></b></font> <font color="#ff0080">*</font></td>
</tr>
<tr>
</tr>
<tr>
<td align="left" valign="top"><br></td>
<td><input value="Submit" name="B1" type="submit"> <input value="Reset" name="B2" type="reset"></td>
</tr>
</tbody></table>
<b><font color="#006600"> </font></b></div>
</form>
Not tested, but hope this helps.
Bookmarks