My form properly submits data via POST utilizing Ajax. However I am trying to redirect the user upon successful submission. The problem is, even though the form successfully submits, instead of redirecting the user it displays an error. According to firebug the page I am submitting to, is throwing up a 200 success code. I am using jquery 1.8.3.

My Code:

$("#form4").submit(function(e) {
    var frm = $('#form4');
        type: 'POST',
        url: '',
        data: frm.serialize(),
        success : function() {
            window.location = "";
        /*error : function() {
            alert("Something went bad");
Here is my form HTML:

<form action="" method="post" id="form4" name="form4" enctype="multipart/form-data">
    <input id="name" name="name" type="text" tabindex="1" value="Insert your name" class="required">
    <input id="email" name="email" type="text" tabindex="2" value="Insert your e-mail" class="required email">
    <input id="phone" name="phone" type="text" tabindex="3" value="Insert your phone number">
    <input type="submit" name="submit_button" value="Try it free">
In an attempt to figure out the exact error, I added the following code to the top of my script, which I found from this POST:

$(function() {
        error: function(jqXHR, exception) {
            if (jqXHR.status === 0) {
                alert('Not connect.\n Verify Network.');
            } else if (jqXHR.status == 404) {
                alert('Requested page not found. [404]');
            } else if (jqXHR.status == 500) {
                alert('Internal Server Error [500].');
            } else if (exception === 'parsererror') {
                alert('Requested JSON parse failed.');
            } else if (exception === 'timeout') {
                alert('Time out error.');
            } else if (exception === 'abort') {
                alert('Ajax request aborted.');
            } else {
                alert('Uncaught Error.\n' + jqXHR.responseText);
After adding that code, that following error I get is from the first error code check: 'Not connect.\n Verify Network.'. I tested this is both firefox and Chrome with same results. I can verify that the post is successfully sending data to the correct url, and firebug is showing a code 200 response. Everything is working perfectly normal except that jquery things there is an error and won't redirect the user to the confirmation page on success.