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
Similar Posts:
- A Simple WYSIWYG Editor in Javascript
- iframe innerHTML value from textarea
- how to get selected textarea value using javascript
- Create selected text to hyperlink in Javascript
- how to change div content in javascript?
- how to check if image loaded or not in javascript?
- iframe value to textbox in javascript
- how to strip special characters with jQuery form validation!
- how to hide textarea?
- Tutorial: How to write a Wordpress Plugin?

