简体   繁体   English

引导程序或jQuery停止表单提交

[英]Bootstrap or jquery stopping form SUBMIT

Tired to make this parallax with bootstrap and jquery.. but FORM is not submitting while this code works fine separately if I run.. If someone can help me out in this.. 厌倦了用bootstrap和jquery使此视差..但是FORM不提交,但是如果我运行,此代码可以单独运行。.如果有人可以帮助我..

Here is page : http://cellsouq.com/xtra/co/ (complete code) Click on OPPORTUNITIES > FRANCHISE (on top navigation) Click on APPLY ... it will scroll to FORM 这是页面: http : //cellsouq.com/xtra/co/ (完整代码)单击“机会”>“特许经营”(在顶部导航上),单击“应用...”,它将滚动到“表格”

Form is something like that with javascript 表单与javascript类似

<script>
function funcFranchise() {
    alert('Submitted Successfull');
    // To validate form elements
}
</script> 

<form onSubmit="return funcFranchise(this)" class="form-horizontal" >
...
<input type="submit" value="Submit Request" class="btn bg-primary" >
</form>

If i remove Bootstrap it works fine. 如果我删除Bootstrap,它将正常工作。 In whole code somewhere submit EVENT is blocked not sure... Please help me out.. 在不确定某处的整个代码中,提交事件被阻止,不确定...请帮助我。

You should return either true or false upon the completion your validations. 验证完成后,您应该返回truefalse So try like; 所以尝试

<script>
function funcFranchise() {
    alert('Submitted Successfull');
    // To validate form elements
    return true;
}
</script> 

try this: 尝试这个:

function funcFranchise() {
alert('Submitted Successfull');
// To validate form elements
$('.form-horizontal').submit();

} }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM