Reputation: 2924
I want to append value to response text that i am getting back from ajax request.
I used below code
$(document).ajaxSuccess(function(event, response, settings) {
var resp = response.responseText;
});
Suppose i am getting response text
i.e
/home/xyz
and i want append
/home/xyz/abc
Any help appreciated
Upvotes: 0
Views: 555
Reputation: 99620
If i understand your question right, you can always do
$(document).ajaxSuccess(function(event, response, settings) {
var resp = response.responseText;
var new_resp = resp + '/abc';
window.location.href = new_resp;
});
Upvotes: 1