I want to submit a form with ajax on ajax success that means i don't want to reload the page when the form is submitted on ajax success. I tried
if (response.success == true ) {
$form = $("#formname");
var form = $form.serializeArray();
form.push({
name: window.csrfTokenName,
value: window.csrfTokenValue
})
The page didnt reload on this but, the form was also not submitted. I also tried document.form['formname'].submit() but that reloaded the page. Please Help