I'm having Problems with my AJAX call. I want to append html to an existing div:
var teaser = $(this);
var url = "http://..."
ajaxHandler.send({
url: "//www...."
dataFilter: function (data, type) {
teaser.append($(data))
}
});
The problem ist, that the URL (var url) I am sending gives a JS response like this:
document.open();
document.writeln('<div id=\"mydiv\" style=\"width:190px; height:160px\">');
document.writeln(' <img src=\"http:\/\/www.abc.gif\" width=\"190\" height=\"160\" alt=\"\" border=\"0\">');
document.writeln('<\/div>');
document.close();
I get the following error:
Uncaught Error: Syntax error, unrecognized expression: document.open();
I'm using jQuery 2.x