I am trying to change the source of the iframe to javascript:... I tried this without any luck;
<iframe id="iframed" src="http://example.com"></iframe>
$('#iframed').attr('src','javascript:document.write("hello world")');
I am getting "TypeError: document.write is not a function" error. What is the correct way to do that ?