I make a ajax call to rest endpoint which returns HTML tags as a string response. Now I need to bind this to iframe.
Here data has html tags like
var data="<html><head><title>iFram</title></head><body>hi</body></html>"
I have tried document.getElementById('iframeid').src=data
also I have tried
$('#iframeid').contents().find("html").append(data);
thanks
finally we have got the solution with iframe attribute "srcdoc" which we used like
document.getElementById('iframeid').srcdoc=data;