iFrame when enabled in design just wont work in firefox. It wont accept any input, but it works very well in internet explorer. I was working on a rich text editor with iframe and this has been a major problem with it.
i finally resolved this.
Mozilla says this line must be called from by the onLoad() in the body, only then it would work
document.getElementById("rte").contentWindow.document.designMode = "On"
2. All elements in the javascript must by called by this function getElementbyID() .
<script type="text/javascript">
function Init() {
document.getElementById("rte").contentWindow.document.designMode = "On";
}
<body onLoad="Init()">
<iframe id="rte"></iframe>
</body>
You can refer to the mozilla documentation which can be very useful
Discussion
No comments for “iFrame in javascript wont work in Firefox [solved]”
Post a comment