onsubmit not calling js function in chrome but submitting form directly
My form is working fine in Firefox and IE. On calling onsubmit it calls js function and validates the code, and if validation is good, then it submits the form.

However, in chrome it is not doing validation, but simply submitting the form directly.

I am not sure why it is so, Did lot of search but in vain.

Any help will be great towards solving this issue.

Form Code:

    <form name="myform" action="queryfeedback.php" method="post" onSubmit="return validateForm(myform);">
    <label for="labelField_Name" id="idLabel_Name"></label>
    <input type="text" name="nameField_Name" id="idField_Name" placeholder="Enter your name here"/>
    <br />
    <label for="labelField_EMail" id="idLabel_EMail"></label>
    <input name="nameField_EMail" type="text" id="idField_EMail" placeholder="Enter your E-Mail address here" />
    <br />
    <label for="labelField_Message" id="idLabel_Message"></label>
    <textarea name="nameField_Message" id="idField_Message" placeholder="Enter your message for us here"></textarea>
    <br />
    <input type="Submit" name="nameSubmit" id="idButton_Submit" value="Submit"  alt="Submit Button"/>
    </form>

Validation Code:

        function validateForm(form)
    { 
    alert(form.nameField_Name.value);
    //alert(formValueEMail.value);
    //alert(formValueMessage.value);
    if(form.nameField_Name.value=='')
    {
    	alert("Name field is required. Please fill it in.");
    	form.nameField_Name.focus();
    	form.nameField_Name.select();
    	return false;
    }
    if(form.nameField_Name.value=='Enter your name here')
    {
    	alert("Name field is required. Please fill it in.");
    	form.nameField_Name.focus();
    	form.nameField_Name.select();
    	return false;
    }
    if(form.nameField_EMail.value=='')
    {
    	alert("E-Mail Address field is required. Please fill it in.");
    	form.nameField_EMail.focus();
    	form.nameField_EMail.select();
    	return false;
    }
    if(form.nameField_EMail.value=='Enter your E-Mail address here')
    {
    	alert("E-Mail Address field is required. Please fill it in.");
    	form.nameField_EMail.focus();
    	form.nameField_EMail.select();
    	return false;
    }
    //Checking for correct format of EMail address.
    var x=document.forms["myform"]["nameField_EMail"].value;
    var atpos=x.indexOf("@");
    var dotpos=x.lastIndexOf(".");
    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
    {
    	alert("Not a valid e-mail address");
    	return false;
    }
    if(form.nameField_Message.value=='')
    {
    	alert("Message field is required. Please fill it in.");
    	form.nameField_Message.focus();
    	form.nameField_Message.select();
    	return false;
    }
    if(form.nameField_Message.value=='Enter your message for us here')
    {
    	alert("Message field is required. Please fill it in.");
    	form.nameField_Message.focus();
    	form.nameField_Message.select();
    	return false;
    }
    return true;
    						

onsubmit not calling js function in chrome but submitting form directly
===

My form is working fine in Firefox and IE. On calling onsubmit it calls js function and validates the code, and if validation is good, then it submits the form.

However, in chrome it is not doing validation, but simply submitting the form directly.

I am not sure why it is so, Did lot of search but in vain.

Any help will be great towards solving this issue.

Form Code:

    <form name="myform" action="queryfeedback.php" method="post" onSubmit="return validateForm(myform);">
    <label for="labelField_Name" id="idLabel_Name"></label>
    <input type="text" name="nameField_Name" id="idField_Name" placeholder="Enter your name here"/>
    <br />
    <label for="labelField_EMail" id="idLabel_EMail"></label>
    <input name="nameField_EMail" type="text" id="idField_EMail" placeholder="Enter your E-Mail address here" />
    <br />
    <label for="labelField_Message" id="idLabel_Message"></label>
    <textarea name="nameField_Message" id="idField_Message" placeholder="Enter your message for us here"></textarea>
    <br />
    <input type="Submit" name="nameSubmit" id="idButton_Submit" value="Submit"  alt="Submit Button"/>
    </form>

Validation Code:

        function validateForm(form)
    { 
    alert(form.nameField_Name.value);
    //alert(formValueEMail.value);
    //alert(formValueMessage.value);
    if(form.nameField_Name.value=='')
    {
    	alert("Name field is required. Please fill it in.");
    	form.nameField_Name.focus();
    	form.nameField_Name.select();
    	return false;
    }
    if(form.nameField_Name.value=='Enter your name here')
    {
    	alert("Name field is required. Please fill it in.");
    	form.nameField_Name.focus();
    	form.nameField_Name.select();
    	return false;
    }
    if(form.nameField_EMail.value=='')
    {
    	alert("E-Mail Address field is required. Please fill it in.");
    	form.nameField_EMail.focus();
    	form.nameField_EMail.select();
    	return false;
    }
    if(form.nameField_EMail.value=='Enter your E-Mail address here')
    {
    	alert("E-Mail Address field is required. Please fill it in.");
    	form.nameField_EMail.focus();
    	form.nameField_EMail.select();
    	return false;
    }
    //Checking for correct format of EMail address.
    var x=document.forms["myform"]["nameField_EMail"].value;
    var atpos=x.indexOf("@");
    var dotpos=x.lastIndexOf(".");
    if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
    {
    	alert("Not a valid e-mail address");
    	return false;
    }
    if(form.nameField_Message.value=='')
    {
    	alert("Message field is required. Please fill it in.");
    	form.nameField_Message.focus();
    	form.nameField_Message.select();
    	return false;
    }
    if(form.nameField_Message.value=='Enter your message for us here')
    {
    	alert("Message field is required. Please fill it in.");
    	form.nameField_Message.focus();
    	form.nameField_Message.select();
    	return false;
    }
    return true;
    						
