473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IFRAME Problem in firefox

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>
Feb 23 '07 #1
12 4287
AricC
1,892 Expert 1GB
This is the HTML forum is this a Javascript problem?
Feb 23 '07 #2
This is the HTML forum is this a Javascript problem?
Well Ignore javascript and just see the HTML Body after removing the buttons and their functuions
Feb 23 '07 #3
AricC
1,892 Expert 1GB
Well Ignore javascript and just see the HTML Body after removing the buttons and their functuions
I don't see anything wrong with the HTML except your mixing XHTML with HTML you should stick with one or the other. I'm also not really clear what the problem is.

Aric
Feb 23 '07 #4
iam_clint
1,208 Expert 1GB
your iframe has no source?
Feb 23 '07 #5
AricC
1,892 Expert 1GB
your iframe has no source?
Without a source it just shows as a big empty box. Please tell us what's not working I think we are a little lost here.

Aric
Feb 23 '07 #6
drhowarddrfine
7,435 Expert 4TB
Is execCommand a Microsoft only thing?
Feb 24 '07 #7
Copy and paste the code below and save the file as .htm or .html. open the file in Internet Explorer and try to type something in the box, It will allow you to type characters in it. When you open it in firefox it will disable the iframe and prevents you to type anything...

Actually I am creating an editor for a Forum.

<HTML>
<Head>
<Title>Simple Demo of HTML Area </Title>
</Head>

<Body onLoad="frameEdit.document.designMode='on';">
<form id="frmEdit">
<IFRAME id="frameEdit" style="width:600px; height:300px" align=center>
</IFRAME>

</form>
</Body>
</HTML>


Thanks to you all
Feb 26 '07 #8
drhowarddrfine
7,435 Expert 4TB
One problem is onload needs to be in lower case. But this continues to look like a javascript problem and not html/css so I am moving it to that forum.
Feb 26 '07 #9
acoder
16,027 Expert Mod 8TB
Is execCommand a Microsoft only thing?
Yes that's right.
Feb 27 '07 #10
acoder
16,027 Expert Mod 8TB
Syed fasih, see this link - that should solve your problem.
Feb 27 '07 #11
Syed fasih, see this link - that should solve your problem.

Thank You So much... My problem has been solved....
Mar 2 '07 #12
acoder
16,027 Expert Mod 8TB
No problem, you're welcome. Glad to see that it solved your problem.
Mar 2 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: wangzx | last post by:
I am the author of easyajax.sourceforge.net, and I have a problem on Firefox 1.5, I post the problem here and hopes somebody help me. The test page can be:...
14
by: Aaron Gray | last post by:
Hi, I want to access the properties of an IFrame but seem unable to get access to the IFrames document body. <html> <body> <iframe src="test.html" id="IFrame"></iframe> </body>
1
by: brussel | last post by:
I'm trying to copy information in one iframe to another iframe with javascript. I am using firefox and information from my local domain so there are no security issues. However I'm just not getting...
1
by: Dave | last post by:
Usual apologies if this is old territory. I'm resizing a bunch of iframes on a page to the height of their contained documents. Some of the contained documents contain IMG tags. On IE this...
12
by: mistral | last post by:
Can anybody tell me how to get source code of page in iframe? (popup window is clickable image). When I right click on this popup border to view source, i see just as follows <html> <head>...
3
by: visu | last post by:
Hi , I need a solution for my problem with IFRAME in firefox. The problem is that i ve to make the IFRAME to increase in its height to displays its whole content dynamically .i ve set...
3
by: CAG | last post by:
Hello, I have following scenario in my web application. I want to load different web forms in single iframe. Iframe in contained in an ASP page. ASP page has “Submit” button, which submits iframe...
1
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: SunshineInTheRain | last post by:
My project has 3 files, File1 has included master page. file1 consists of iframe1 that load file2. File2 consists of iframe2 that load file3. Javascript used on each file to resize the iframe...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.