I am trying to print a screenshot from the OpenCPU
, which returns everything in a group and does not accept the line breaks.
When using console.log()
I get the open cpc url with the perfect line breaks, but in the index I get out
This is my code;
function (data) {
var statResultsLink = resultsUrlPrefix + data.toString().match(/.+\/stdout/m),
chartLink = resultsUrlPrefix + data.toString().match(/.+\/graphics\/[1]/m);
// Add statistical (textual) results to results div
$('#results').append("<br/>");
$('<div/>', {
id: 'statResults'
}).appendTo('#results');
$(document).ready(function() {
$("#statResults").load(statResultsLink);
});
// Add charts results to results div
$('#results').append("<br/>");
$('<img/>', {
id: 'chartResults',
src: chartLink
}).appendTo('#results');
}
"); $('', { id: 'statResults' }).appendTo('#results #pre'); – lionel tolosa Apr 28 '17 at 11:26