Hi, I'm aware that this is kinda a hack but for reasons of simplicity I would like to replace the contents of an entire webpage with an answer received through Ajax. This includes possible HTTP headers. Is it possible to do so?
To clarify further, right now I added for debugging purposes:
alert(response);
and this produces:
For reasons I don't wanna get into I cannot do something like location.href = 'ajax_page'
. Solutions that use jQuery would be better.
Code used to obtain the data:
$(document).ready(function() {
new AjaxUpload('#upload', {
action: '/AjaxSubmit',
name: 'file',
autoSubmit: true,
onSubmit: function(file, extension) { return true; },
onComplete: function(file, response) {
alert(response);
}
});
});