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="JavaS cript">
function doBold()
{
frameEdit.docum ent.execCommand ('bold', false, null);
}
function doItalic()
{
frameEdit.docum ent.execCommand ('italic', false, null);
}
function Heading()
{
frameEdit.docum ent.execCommand ('FormatBlock', false,'<H1>');
}
</Script>
</Head>
<Body onLoad="frameEd it.document.des ignMode='on';">
<form id="frmEdit">
<IFRAME id="frameEdit" style="width:60 0px; height:300px" align=center>
</IFRAME>
<br>
<P align=center>
<Input type="Button" value="Bold" onClick="doBold ()">
<Input type="Button" value="Italic" onClick="doItal ic()">
<Input type="Button" value="H1" onClick="Headin g()">
</P>
</form>
</Body>
</HTML>
<HTML>
<Head>
<Title>Simple Demo of HTML Area </Title>
<Script Language="JavaS cript">
function doBold()
{
frameEdit.docum ent.execCommand ('bold', false, null);
}
function doItalic()
{
frameEdit.docum ent.execCommand ('italic', false, null);
}
function Heading()
{
frameEdit.docum ent.execCommand ('FormatBlock', false,'<H1>');
}
</Script>
</Head>
<Body onLoad="frameEd it.document.des ignMode='on';">
<form id="frmEdit">
<IFRAME id="frameEdit" style="width:60 0px; height:300px" align=center>
</IFRAME>
<br>
<P align=center>
<Input type="Button" value="Bold" onClick="doBold ()">
<Input type="Button" value="Italic" onClick="doItal ic()">
<Input type="Button" value="H1" onClick="Headin g()">
</P>
</form>
</Body>
</HTML>
Comment