$.ajax({ type:"POST", url:"xxxxx.php", async: false, data: $("#form_id").serialize() success: function(data){ if(data == 'redirect'){ window.location.href='../Main/index.html'...