Hi,
I have been stuck with a problem and was wondering if someone could shed some light on it.
I am loading a webpage and trying to insert some html dynamically into a IFRAME which has been set to editable (To be used as a wysiwyg editor).
I have been able to do it in Mozilla using:
document.getElementById('iView').contentWindow.doc ument.body.innerHTML = "<b>Testing</b>";
and am trying for ie:
iView.document.body.innerHTML = "<b>Testing</b>";
It seems that IE isnt allowing me to add html to the IFRAME untill I have written content into it.
Any help with my problem would be great.
Example Code:
Quote:
<html>
<body onLoad="Init()">
<script>
var IE;
function Init()
{
document.getElementById('iView').contentWindow.doc ument.designMode = "on";
if(navigator.appName == "Microsoft Internet Explorer") {
this.iView.document.body.innerHTML = "<b>Testing</b>";
}
else {
document.getElementById('iView').contentWindow.doc ument.body.innerHTML = "<b>Testing</b>";
}
}
</script>
<iframe id="iView" style="width: 600; height: 400; "></iframe>
</body>
</html>
|
__________________
Please login or register to view this content. Registration is FREE - The Internet Jumble Sale,
Please login or register to view this content. Registration is FREE - Personal space containing interesting articles and information on downloadable scripts
Please login or register to view this content. Registration is FREE - Free link exchange directory and PPC advertising scheme
Please login or register to view this content. Registration is FREE - The ejumblesale forums
|