473,469 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Write into iFRAME ( IE 6 Bug?)

Here's the code:
<html>
<body onload="setTimeout('Writing();', 1000);" topmargin=0>
<form id=Form1>
<iframe id="mainchat" src="about:blank" height=200></iframe>

<script language="javascript">
function Writing(){
window.frames[0].document.write('<a href="javascript:void(0);"
onclick="javascript:alert(\'alert\');">writing</a ');
setTimeout('Writing()', 3000);
//alert('firing');
}
</script>

</form>
</body>
</html>
If you execute it in IE 6.0 and click on the WRITING <Atag being
printed every 3 seconds in the iframe, it will stop writing into
iFrame, the setTimeout will still be firing but document.write command
will be ignored!!!

Works perfectly in IE 7 and Firefox.

Is there any way to make it work in IE 6 ???

Feb 26 '07 #1
1 5424
On Feb 26, 1:32 pm, m...@zazasoftware.com wrote:
Here's the code:
<html>
<body onload="setTimeout('Writing();', 1000);" topmargin=0>
<form id=Form1>
<iframe id="mainchat" src="about:blank" height=200></iframe>

<script language="javascript">
function Writing(){
window.frames[0].document.write('<a href="javascript:void(0);"
onclick="javascript:alert(\'alert\');">writing</a ');
setTimeout('Writing()', 3000);
//alert('firing');
}
</script>

</form>
</body>
</html>

If you execute it in IE 6.0 and click on the WRITING <Atag being
printed every 3 seconds in the iframe, it will stop writing into
iFrame, the setTimeout will still be firing but document.write command
will be ignored!!!

Works perfectly in IE 7 and Firefox.

Is there any way to make it work in IE 6 ???
Fixed:

Replaced onclick="javascript:alert(\'alert\');"with
onclick="javascript:alert(\'alert\');return false;">

Feb 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: gsb | last post by:
Object tag to write HTML page to via JavaScript? I've used iFrames and Objects to load web pages into another page. I want to do similar but not load a uri, rather write the page, <HTML>...
5
by: Reply Via Newsgroup | last post by:
Folks, I am specifically using an IFRAME but am also interested if this is possible via a window opened using window.open Basically - I have a popup window that I use for uploads - When an...
9
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
6
by: ok | last post by:
<img src="http://www.6park.com/enter2/av.gif" onload="document.write('an iframe obj');"> First of all, it destroy the HTML page. Secondly even if it does not destroy it, the iframe object will...
2
by: Gunther Radick | last post by:
Let's say I've an IFRAME on a page, with an ID of "myFrame". If I call - myFrame.document.write( "Something" ); the "Something" gets written to the IFRAME, as expected, but the browser (and...
1
by: Robert Oschler | last post by:
I have two sites, both with valid P3P policies that passed the W3C P3P validator, including the P3P compliant HTTP headers test. On one of the sites, Site A, I have a web page that loads a...
1
by: Asha | last post by:
greetings, i'm using an iframe <iframe id="iFrame" runat="server" src="SC_Ext_Rpt.aspx" width="775px" height="900px" frameborder="no"> </iframe> and in my file SC_Ext_Rpt.aspx, if i were to...
8
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the...
2
by: juergen.riemer | last post by:
Hi all, I create an IFrame and want to dynamically add content to it in Opera (8.54) like this: <html> <body> <script> oPanel = document.createElement("IFRAME"); oPanel.src = "about:blank";
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.