This is a really simple problem. I had this working and then i must of changed something and now it doesn't work. Its just a peice of JS code checking for an empty string. Here is the code below. It's been driving me mad for 20 minutes trying to figure out what is wrong with this ridicliously simple code.
<script type="text/javascript">
function validateForm(){
var email= document.getElementById('email').value;
if (email.length==''){
alert("please fill out email");}}
</script>
<form name="contact" method="post" action='ContactPHP.php'>
Your Email: <input name='email' type='text' /><br />
<input type="button" value="submit" onClick="validateForm()"/>
</form>