Skip to Content
Menu
This question has been flagged
4002 Views

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;

}

Avatar
Discard

just goto the logs and see whats happening, actually its submitted on the defined URL but nothing is processed or error

Author

Exactly

Related Posts Replies Views Activity
0
Mar 21
5199
3
Jul 20
18536
2
Jan 19
5101
1
Dec 18
1842
1
Jul 18
6093