I am successfully loading via AJAX some svg from external file:
$(\"#svg\").load(svgUrl + \" svg\", function() { // do stuff });
I got it to work like this.
$.ajax({ url: url, data: {data:tosendAlong}, type: "POST", dataType: "text", success: function (svg) { $("#map").html('' + svg) .attr({ 'height': '100%', 'width': '100%' }); } })