473,659 Members | 2,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to write to another frame?

I wonder, what would be the best way to write content to another frame?
Meaning that as many browsers as possible supports it.

I have a frame that reloads with a 3 second interval, and depending on if
the user has entered information in a database (chat messages), it writes
the content to another frame. The content it has written before should be
visible.

I've tried

document.parent['framename'].document.write ('TEXT'); (I believe I had some
problems with this in mozilla)

document.parent['framename'].document.getEl ementById('msgd iv').innerHTML +=
content;

May explanation may have been insufficient, please tell me if it was.
Jul 20 '05 #1
1 7111
"Mikko Tussunen" <af**@faef.co m> writes:
I wonder, what would be the best way to write content to another frame?
Meaning that as many browsers as possible supports it. I have a frame that reloads with a 3 second interval, and depending on if
the user has entered information in a database (chat messages), it writes
the content to another frame. The content it has written before should be
visible.
The last part is a problem. You can get around it with programming,
but it is not immediate. When you have closed the document, writing to
it will erase the previous content, and you should close the document
to make sure that it is displayed correctly.
I've tried

document.parent['framename'].document.write ('TEXT'); (I believe I had some
problems with this in mozilla)
Try
parent.frames['framename'].document.write ('TEXT');
document.parent['framename'].document.getEl ementById('msgd iv').innerHTML +=
content;


innerHTML sure isn't the best method if you want as many browsers as
possible to understand it.

To keep the old content, you can store it as a property of the frame
object after writing it to the document. Then, before writing new
content, you read it back, append the new content, document.write it
and store it in the frame again.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

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

Similar topics

1
1853
by: Bilbo | last post by:
Hello, How do I programatically redirect a page in "another frame" using C# in ASP.NET? Server.Transfer redirects the current page...not a different frame. Thanks.
3
2461
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a button inside a-tag with attribute target isn't anything new relating ASP.Net, its same old HTML). He claimed that you could change another page´s controls´s property´s value from another frame by using this method: ' Page "Bottom"
3
1962
by: Microsoft | last post by:
How do I refer to the content of one frame from another frame. Depending on which command button is pressed in one frame I wish to chnage what is displayed in another frame. Thanks Colin
1
2381
by: Just D. | last post by:
All, How can we redirect to another frame from the C# code? I usually use Response.Redirect("TargetPage.aspx") to redirect inside the current frame, but I don't know really how can I change the frame and open a required page in another frame to leave the active frame in its current condition and continue working in the second frame? Is it possible at all from the C# code? Or we need to write a JAVA script and call it from C# code? ...
3
6527
by: ezmiller | last post by:
So I have some code that gets the body element of another frame and then tries to dynamically write a table. The code fails when, after creating the table, I try to append it to the document. I get an invalid argument error. Here's the code.... var docBody = top.frames.document.getElementsByTagName("BODY");
11
16930
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got the following frame structure at the top level: FRAMESET CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> <html><head><title>Server List</title></head> <frameset frameborder="1" border="1" framespacing="1" rows="10%,89%">
1
1584
by: ramapv | last post by:
we have two frames in which one has elements already existand other are the elements selected from these. so we mentioned the existing elements as hyper links and added there value on double click to another frame as a selected element.using <a style="text-decoration:none" href="#" onDblClick="top.select.document.writeln('<%=c.getString(1)%><br>');"> but for further proceeding i need these values . Is there any way for retrieving...
7
2993
by: Leoa | last post by:
Hi All, I'm having a hard time figuring out the DOM syntax to get one frame that has thumnails of images to display at full size in another frame (onmouseover). I looked at a couple tutorials and have come up with the broken script below. Please Help.- ------------------------------------------
1
1938
by: sayid | last post by:
Hello, I have a problem when altering a DIV-element from another frame. The frameset looks like this: <frameset rows=0,0,* border=0> <frame name=header src=/header.htm scrolling=no noresize="true" frameborder=0> <frame name=border src=/border.htm scrolling=no noresize="true" frameborder=0> <frameset cols=200,* border=0> <frameset rows=*,0 border=0>
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8330
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.