I have created a text area using IFRAME. The problem is that it is working only in Internet Explorer not in Mozilla Firefox. Please help me regarding this problem. IS there any special command or tag which runs on both IE and firefox? Thanks in advance.... Code is below:
<HTML>
<Head>
<Title>Simple Demo of HTML Area </Title>
<Script Language="JavaScript">
function doBold()
{
frameEdit.document.execCommand('bold', false, null);
}
function doItalic()
{
frameEdit.document.execCommand('italic', false, null);
}
function Heading()
{
frameEdit.document.execCommand('FormatBlock', false,'<H1>');
}
</Script>
</Head>
<Body onLoad="frameEdit.document.designMode='on';">
<form id="frmEdit">
<IFRAME id="frameEdit" style="width:600px; height:300px" align=center>
</IFRAME>
<br>
<P align=center>
<Input type="Button" value="Bold" onClick="doBold()">
<Input type="Button" value="Italic" onClick="doItalic()">
<Input type="Button" value="H1" onClick="Heading()">
</P>
</form>
</Body>
</HTML>