topical media & game development
basic-web-html-12-emailform.htm / htm
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>E-mail form</title>
<script type="text/JavaScript">
function add(objInput, objList){
var strGroup = objList.options[objList.selectedIndex].value;
if (objInput.value == "")
{
objInput.value = strGroup
}
else
{
objInput.value += ('; ' + strGroup)
}
}
function validate(form) {
var returnValue = true;
var sendTo = form.txtTo.value;
var cc = form.txtCC.value;
var subject = form.txtSubject.value;
var message = form.txtMessage.value;
if (sendTo == "")
{
returnValue = false;
alert("There are no email addresses in the To field");
form.txtTo.focus();
}
if (subject == "")
{
returnValue = false;
alert("There is no subject line for this e-mail");
form.txtSubject.focus();
}
if (message=="")
{
returnValue = false;
alert("There is no message to this e-mail");
form.txtMessage.focus();
}
var arrTo = sendTo.split("; ");
var rxEmail=/^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,6}(\.[a-z]{2})?
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.