i have a registration form, form should get submit after performing validation
here validation is performing but form is not submitting
my form is like this.
======================form====================
<form action="/website/form/" method="post" class="s_website_form form-horizontal container-fluid mt32" enctype="multipart/form-data" data-model_name="empdetails.regis" data-success_page="/christjobs/thankyou" >
<input type="text" name="reg_name" class="form-control" placeholder="NAME OF STUDENT AS PER 10 RECORD " />
<input type="button" class="btn" value="Submit" id="btnSubmit; insert" onclick="ddlValidate();" />
</form>
=================java script=====================
function ddlValidate() {
var reg_name = document.forms['frm'].reg_name.value
if(reg_name === "") {
alert("reg_name empty");
document.getElementById(question).style.background ='#F99984';
return false;
}
if(reg_name != ""){
document.forms["frm"].submit();
}
return true;
}
just goto the logs and see whats happening, actually its submitted on the defined URL but nothing is processed or error
Exactly