I'm trying to run a small application in an iframe
using whatever origin:
<script>
$.getJSON('http://whateverorigin.org/get?url=' +
encodeURIComponent('http://vend.giftcardservices.nl/saldo/3') +
'&callback=?', function(data){
alert(data.contents);
});
</script>
And the alert shows the html is fetched, but when I try to document.write(data.contents)
, nothing is happening. How do I get this code to be executed in the browser?