If I want to send a POST request and display the response as a complete page by submitting a form, how can I achieve the same result using an ajax request? Specifically:
$.ajax('test.com', {
'method': 'POST',
'success': function(res) {
// How do I open a new page and render the response as a full page?
// Using window.location = "foobar" won't work because it's a POST request
}
});
Alternatively, if this approach seems unusual, what is the more conventional method of accomplishing this?