PDA

View Full Version : Script Help


stevan
01-07-2003, 10:18 PM
When using the send mail script I use for email off my site where do i insert the check script
Like i have it here or do i have to chge some

Thxs STeve


<form action="http://207.235.6.119/cgi-bin/nmail.pl" method="POST">
<input type=hidden name="to" value="info@cruisewarehouse.cc">
<input type=hidden name="redir"
value="http://www.cruisewarehouse.cc/html/thanks.html">

<form name="validation" onSubmit="return checkbae()">
Please input a valid email address:<br>
<input type="text" size=18 name="emailcheck">
<input type="submit" value="Submit">
</form>
<script language="JavaScript1.2">

//Advanced Email Check credit-
//By JavaScript Kit (http://www.javascriptkit.com)
//Over 200+ free scripts here!

var testresults
function checkemail(){
var str=document.validation.emailcheck.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}
</script>

<script>
function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}
</script>

<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript
Kit</a></font></p>

requestcode
01-08-2003, 01:13 PM
You would place the script part in the HEAD section of your document.