I have very very stupid bug in javascript validation
let me i explain in code :
this is my form tag
<form method="post" enctype="multipart/form-data" name="myForm" onsubmit="return validateForm()">
<textarea id="content" name="Body"><%= Model.Body %></textarea>
</form>
and this is my script :
function validateForm(e) {
debugger;
var reviewMessage = $("[name='Body']").attr('value');
//var overallValue = document.getElementsByClassName('checkbox overall icon-checkbox').prop.checked;
if (reviewMessage.length < 100) {
e.preventDefault();
// $("Body").show();
$('#bodyValidation').css({'display' : 'block'});
return false;
}
return true;
}
my problem is that when ever i click the button page will be submited ;
but i want to stop this action with javascript .
how can i do that?