I am working on a project where I am building an iframe and filling it with html code to display an rss feed. The code below shows how I am accomplishing this. It works fine in firefox but when I run the function in internet explorer it doesn't load the rss feed. any ideas?
JavaScript Function
function AddIframe()
{
ifrm = document.createElement("iframe");
ifrm.setAttribute("name", "iFrame1");
ifrm.setAttribute("id","iFrame1");
document.body.appendChild(ifrm);
ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
ifrm.document.open();
ifrm.document.write("<html><head><title>testIframe</title></head><body><div> <script language='JavaScript' src='http://itde.vccs.edu/rss2js/feed2js.php?src=http%3A%2F%2Fwww.nfl.com%2Frss%2Frsslanding%3FsearchString%3Dhome&chan=n&num=20&desc=1&date=y&targ=y' type='text/javascript'>" + String.fromCharCode(60).toString() + "/script> </div></body></html>");
ifrm.document.close();
}
HTML
<div>
<input type="button" value="Click Here" onclick="AddIframe();" />
</div>