Home Is there any way to redirect to a new page using ajax with response also sent to the new page
Reply: 0

Is there any way to redirect to a new page using ajax with response also sent to the new page

user769
1#
user769 Published in May 20, 2018, 12:01 pm

I want to redirect to a new page after the ajax is complete/success. That is working fine. But I want to view the response in the new page where I am directing to.

I am not sure if there is any existing way to do it.

function directtoedit(object) {

    $('#edit-field-tei-document-und-0-xml').focus();
    $('#toolbar-back').show();

    clickedTitle = object;

    $.ajax({
        url: "tabs/get_old_contents.php",
        data: {
            seltitle: clickedTitle
        },
        type: 'post',
        complete: function(response) {
            location.href = "tabs/test.php"
            console.log('selectHey' + response.responseText); //Want to view response in test.php
        }
    });
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.343516 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO