Forum Moderators: not2easy
Let me quickly explain why we need it. The child window's (iframe) source is dynamically generated by a .dll (organisation chart software). This is a stand alone product which we are integrating into another web app and want to add some of our web app style to it. The chances of the .dll output changing to include our stylesheet are zero - hence our need for a client-side solution.
<iframe name="myiframe" src="page.htm">
</iframe>
<script type="text/javascript">
window.myiframe.attachEvent('onload',attachCSS)
function attachCSS()
{
linkelm=document.createElement("link");
linkelm.rel="stylesheet";
linkelm.type="text/css";
linkelm.href="test.css";
window.myiframe.document.body.insertAdjacentElement('beforeEnd',linkelm);
}
</script>