Can't type into iframe???
Posted: Mon Jul 16, 2007 8:49 pm
feyd | Please use
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
When I test the code below in Firefox I can't type into the iframe however when I test it in IE typing is possible. So I am wondering if there is a way if there is a way to be able to type in Firefox? Thanks in advance.
[syntax="html"]
<body onLoad="def()">
<form name="rteForm" method="post" action="">
<table width="63%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<input name="bold" type="button" id="bold" value="B" onClick="fontEdit('bold')" />
<input name="italics" type="submit" id="italics" value="ITALICS" />
<input name="underline" type="submit" id="underline" value="UNDERLINE" />
<input name="websitelink" type="submit" id="websitelink" value="WEBSITE LINK" />
<input name="emaillink" type="submit" id="emaillink" value="EMAIL LINK" />
<input name="bullets" type="submit" id="bullets" value="BULLETS" />
<input name="save" type="submit" id="save" value="SAVE" />
<input name="preview" type="submit" id="preview" value="PREVIEW" /></td>
</tr>
<tr>
<td><iframe id="textEditor" style="width:500px; height:170px;"></iframe>
<script language="javascript">
textEditor.document.designMode="on";
textEditor.document.open();
textEditor.document.write('<head><style type="text/css">body{ font-family:arial; font-size:13px; }</style></head>');
textEditor.document.close();
function def()
{
document.getElementById("fonts").selectedIndex=0;
document.getElementById("size").selectedIndex=1;
document.getElementById("color").selectedIndex=0;
}
function fontEdit(x,y)
{
textEditor.document.execCommand(x,"",y);
textEditor.focus();
}
</script>
</td>
</tr>
</table>
</form>
</body>
</html>
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]