WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 appending <link> to an iframe, Josť Jeria, April 26, 2004
     Re:appending <link> to an iframe, Josť Jeria, April 27, 2004
         Re:appending <link> to an iframe, aa, October 5, 2004
         Re:appending <link> to an iframe, Erik Arvidsson, May 1, 2004
             Re:appending <link> to an iframe, Josť Jeria, May 2, 2004

Subject: appending <link> to an iframe From: Josť Jeria Date: April 26, 2004
Following works fine in Mozilla but not in IE, how can i append the <link> tag in IE to the iframe?

Also I noticed that this doenst work if no src is set. test.html is just a empty html page.

<script type="text/javascript">
window.onload = function()
{
var content = document.getElementById("content");

content.contentWindow.document.designMode = "on";
content.contentWindow.focus();

var elm = document.createElement("link");
elm.rel = "stylesheet";
elm.type = "text/css";
elm.href = "css/iframe.css";

content.contentWindow.document.getElementsByTagName("head")[0].appendChild(elm);
}
</script>

<iframe id="content" src="a.html" frameborder="1"></iframe>



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX