<head>
<script language = "Javascript">
/**
* DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
*/
function echeck(str) {
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Invalid Email ID")
return false
}
if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("Invalid Email ID")
return false
}
if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("Invalid Email ID")
return false
}
if (str.indexOf(at,(lat+1))!=-1){
alert("Invalid Email ID")
return false
}
if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("Invalid Email ID")
return false
}
if (str.indexOf(dot,(lat+2))==-1){
alert("Invalid Email ID")
return false
}
if (str.indexOf(" ")!=-1){
alert("Invalid Email ID")
return false
}
return true
}
function ValidateForm(){
var emailID=document.WebsiteQuestion.Email
if ((emailID.value==null)||(emailID.value=="")){
alert("Please Enter your Email ID")
emailID.focus()
return false
}
if (echeck(emailID.value)==false){
emailID.value=""
emailID.focus()
return false
}
return true
}
</script>
</head>
<body>
<div id="websitequestion">
<form action="websiteformhandler-test.asp" method="post" name="WebsiteQuestion" id="WebsiteQuestion" onsubmit="return ValidateForm()">
<input type="text" name="Email">
<h1><span>Ask a Question About This Website</span></h1>
<p>Please use this form to submit questions or comments about this website. Complete the form below then click "Submit." </p>
<label>Would you like a reply?</label>
<input type="radio" name="Reply" value="Yes" checked="checked" />
Yes
<input type="radio" name="Reply" value="No" />
No
<p> </p>
<div class="webform">
<p class="break"></p>
<label>Name:</label>
<div class="left"><input type="text" class="blue_form_box" name="SubmittedBy" maxlength="75" size="50" />
</div>
<p style="clear:both"></p>
<label>Library Card:</label>
<div class="left"><input type="text" class="blue_form_box" name="LibCd" maxlength="75" size="50" />
</div>
<p style="clear:both"></p>
<label>Street Address:</label>
<div class="left"><input type="text" class="blue_form_box"name="Address" maxlength="75" size="50" />
</div>
<p style="clear:both"></p>
<label>City/State:</label>
<div class="left"><input type="text" class="blue_form_box" name="city" maxlength="50" size="25" />
</div>
<p style="clear:both"></p>
<label>Zip Code:</label>
<div class="left"><input type="text" class="blue_form_box" name="zip" maxlength="10" size="11" />
</div>
<p style="clear:both"></p>
<label>Email Address:</label>
<div class="left"><input type="text" class="blue_form_box" name="Email" maxlength="75" size="50" /><br />
<span class="red">*Required</span>
</div>
<p style="clear:both"></p>
<label>Question:</label>
<div class="left"><textarea class="blue_form_box" name="SuggestionText" rows="3" cols="50"></textarea></div>
<p style="clear:both"></p>
</div>
<div align="center">
<script language="javascript" src="http://www.captcha.cc/cap.js?cap_k=tocsoLPahVjmEHJZWtenaJEDoJXfrQaa" type="text/javascript"></script>
<input type="hidden" name="cap_h" id="cap_h" value="">
<img border="1" id="cap_i" src="http://www.captcha.cc/img.cgi?cap_k=tocsoLPahVjmEHJZWtenaJEDoJXfrQaa" align="middle"><img align="middle" style="margin-left: 4px;" id=cap_r onload="return cap_showReload(event);" src="http://www.captcha.cc/blank.png"><br>
<input id="cap_t" name="cap_t" type="text" value="" style="margin-top:4px;">
<input type="submit" value="Submit Form" onclick="return cap_valid(event);">
</div>
</body>
Attached File(s)
-
websiteform-test.html (18.74K)
Number of downloads: 27

New Topic/Question
Reply



MultiQuote






|