I was trying to create an iframe element using javascript, like so:
var iframe = document.createElement(\'iframe\');
iframe.setAttribute(\'name\', \'frame_x\
Welcome to SO.
One issue I saw in your code is that you're never actually displaying the iframe. In order for it to appear on the page, you have to insert it into your document. In my example, I create a tag to act as the slot where the iframe will get inserted.
See if this does what you're looking for.
Hello Erwin!
UPDATE:
I found that this solution is only working in Firefox. So I did some experimenting. It seems that if you define the iframe in the html (instead of generating it via JS/DOM) then it works. Here is the version that works with IE and Firefox:
Hello Erwin!