I am submitting form data using Ajax and they are successfully saved in the database and I am able to alert the response data. I now want to use the returned data as response to call another function using Ajax and pass them as parameters so that to the called function they can be used to fetch data and and display them on the web page.

The problem is that when the data have been alerted, the function I call using Ajax is not responding even when I use some functions like `window.location.href`, `window.location.replace`, `window.location.reload` they are not executed

Here is the sample code

```
submitHandler: function(form) {
    /*errorHandler.hide(); */

    var el = $(div);
    el.block({
        overlayCSS: {
            backgroundColor: '#fff'
        },
        message: '<i class="fa fa-refresh fa-spin"></i>',
        css: {
            border: 'none',
            color: '#333',
            background: 'none'
        }
    });
    /*Set off for database validation */
    $('#name1').removeClass('has-error');
    $('#name1 .help-block').empty();
    $('#date1').removeClass('has-error');
    $('#date1 .help-block').empty();
    /*end database validation */

    /*ajax options */
    var options = {
        /*target:        '#output2',    target element(s) to be updated with server response */
        success: function(data, textStatus, XMLHttpRequest) {
            el.unblock();
            if (!data.success) {
                /*append error message on the form for each control and database validation*/
                console.log(data);
                if (data.errors.name1) {
                    $('#name1').addClass('has-error');
                    $('#name1 .help-block').html(data.errors.name1);
                }
            } else {
                var business_id = data.business_id;
                var bnm_app_id = data.bnm_app_id;
                var name = data.name;
                var doc = data.doc;

                alert(business_id);
                alert(bnm_app_id);
                alert(name);
                alert(doc);

                if (window.XMLHttpRequest) {
                    myObject = new XMLHttpRequest();
                } else if (window.ActiveXObject) {
                    myObject = new ActiveXObject('Micrsoft.XMLHTTP');
                    myObject.overrideMimeType('text/xml');
                }

                myObject.onreadystatechange = function() {
                    data = myObject.responseText;
                    if (myObject.readyState == 4) {
                        //document.getElementById('step-2').innerHTML = data;
                        window.location.reload(true);
                    }
                }; //specify name of function that will handle server response........

                myObject.open('GET', '<?php echo base_url()."bn_application/register";?>?bnm_app_id=' + bnm_app_id + '&doc=' + doc + '&business_id=' + business_id + '&name=' + name, true);
                myObject.send();

            }
        },
        error: function(xhr, textStatus, errorThrown) {
            el.unblock();
            if (xhr.responseText === undefined) {
                $.gritter.add({
                    /* (string | mandatory) the heading of the notification */
                    title: 'Connection timed out',
                    class_name: 'gritter-black'
                });
            } else {
                var myWindow = window.open("Error", "MsgWindow", "width=900, height=400");
                myWindow.document.write(xhr.responseText);
            }
            /*clear controls that do not need to keep its previous info */
        },
        url: home + 'bn_application/save_clearance_name',
        /* override for form's 'action' attribute*/
        data: {
            name1_percent: name1_percent
        },
        type: 'post',
        /* 'get' or 'post', override for form's 'method' attribute*/
        dataType: 'json',
        /* 'xml', 'script', or 'json' (expected server response type)*/
        beforeSend: function() {

        },
        uploadProgress: function(event, position, total, percentComplete) {

        },
        complete: function() {

        }
    };
    /*submit form via ajax */
    $('#bn_clearance').ajaxSubmit(options);
}

```