All pastes #165854 Raw Edit

Unnamed

public javascript v1 · immutable
·published 2006-09-10 07:14 UTC
rendered paste body
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><script language="javascript">function validate(contactform) {	var alpha=/[^a-zA-Z]+/;	alert("Hello");		if (contactform.elements['name'].value=="") { 	alert("You must enter a name so we know who you are!");	return false;	} 		if ((contactform.elements['email_address'].value=="") && (contactform.elements['phone_number'].value=="")) {	alert("You must enter an email address or phone number so we can contact you if we need to.");	return false;	}		if (alpha.test(contactform.elements['name'].value)){	alert("Your name can only consist of letters and a space.");	return false;	}		return true;} </script><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Trinity</title><link rel = "stylesheet" type = "text/css"	   href="Trinity.css"></head><body><h2>Contact Us</h2><p>Have some feedback or comments for Trinity? Or simply want to ask us a question?  Drop us a line!</p><br><!--Below contains contact details for customers to contact if they do not have email --><p>You can also contact us via snail mail at :<br>  <br>  Po Box 326<br>  Geelong<br>  Victoria 3224<br>  Australia<br>  <br>  Telephone : +61 03 52237268</p><!--This is the form that customers can fill in to contact Trinity via email --><form name="contactform" onSubmit="javascript:return validate(this);" method="post" action="">  <table>    <tr>      <td><span>Name</span></td>      <td><input name="name"></td>    </tr>    <tr>      <td><span>Email address</span></td>      <td><input name="email_address"></td>    </tr>    <tr>      <td><span>Contact phone number</span></td>      <td><input name="phone_number"></td>  </table>  <textarea name="entry6" rows="8" cols="80">Please place your comments here</textarea>  <br>  <br>  <input type="submit" value="Submit"></form><h6><span>&copy;Deakin University, School of Information Technology. This web    page has been developed as a student assignment for the unit SIT104: WWW    and Internet. Therefore it is not part of the University's authorised web    site. DO NOT USE THE INFORMATION CONTAINED ON THIS WEB PAGE IN ANY WAY.</span> </h6></body></html>