I do the registration, and my html code
<div class="tab-pane" id="step1"> <form method="POST" onSubmit="return false;" data-parsley-validate="true" v-on:submit="handelSubmit($event);"> <div class="wizard-footer"> <div class="pull-right"> <button type="submit" class='btn btn-next btn-primary' name='next' value='Next'>Next</button> </div> </div> </form> </div> <div class="tab-pane" id="step2"> <button type="submit" class='btn btn-next btn-primary' name='next' value='Next'>Next</button> </div>
btn-next jumps to the next tab. If I remove btn-next , it will not move to the next tab.
My vue js code
submitBox = new Vue({ el: "#submitBox", data: { -- -- - }, methods: { handelSubmit: function(e) { var vm = this; data = {}; -- -- -- -- -- -- $.ajax({ url: '/add/post/', data: data, type: "POST", dataType: 'json', success: function(e) { if (e.status) { alert("Success") vm.pid = e.pid; console.log(vm.pid); } else { vm.response = e; alert(" Failed") } } }); return false; }, handleSubmit: function(e) { -- -- -- -- -- -- -- -- -- - } }, });
If e.status, then I only need to switch to another tab. But now, if the warning also does not work, I will switch to another tab. How can I solve this problem. Please help me solve the same solution.
source share