This is html form
<div class="tab-pane" id="step1">
<form method="POST" onSubmit="return false;" data-parsley-validate="true" v-on:submit="handelSubmit($event);">
**DATA COMES HERE**
<div class="wizard-footer">
<div class="pull-right">
<button type="submit" class='btn btn-next btn-primary' name='next' value='Next'>Next</button>
</form>
</div>
DATA COMES HERE
My vue js script is
I have only added ajax request
$.ajax({
url: 'http://127.0.0.1:8000/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")
}
}
});
I need to move to next tab only if success. But now if anything happens, it is moving to next tab. How can I make button to move to next tab only if status is true. Only if alert message is success. I need to move to next tab. Please help me to solve the problem?