JSFiddle - React, Tailwind, and code Playground
by Ranganadh Paramkusam
HTML
<div id="output"></div>
<iframe></iframe>
JavaScript
$(document).ready(function(){
var url = 'http://test.localfeedbackloop.com/api?apiKey=61067f81f8cf7e4a1f673cd230216112&noOfReviews=10&internal=1&yelp=1&google=1&offset=50&threshold=1';
var fr = $('iframe')[0];
window.addEventListener('message', function(e) {
var message = e.data;
alert(message);
});
fr.onmessage = function(){
alert(document.body.innerHTML);
top.postMessage(document.body.innerHTML);
}
fr.src = url;
return false;
$.ajax({
url : 'http://test.localfeedbackloop.com/api?apiKey=61067f81f8cf7e4a1f673cd230216112&noOfReviews=10&internal=1&yelp=1&google=1&offset=50&threshold=1',
success : function(resp){
alert(123); $("#output").html('<pre>'+JSON.stringify(resp,'','\t')+'</pre>');
},
beforeSend : function(){
console.log(arguments)
},
dataType: 'json',
crossDomain : true,
type: 'GET'
})
})