473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Writing to popups

Hi,

I am trying to write the content of one html page to another. But the
problem is it overwrites everything that other html page has.
For Example, I have two pages. One is 1.html & second is 2.html. There
is a div in 1.html. I want to write that div contents to 2.html.
2.html has some content in it. But when I write to 2.html, the div
content is overwriting everything that is in 2.html and I dont want to
do that.
I am using this to write:
printWin = window.open("2.html","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();

Any Ideas what I am doing wrong here?
Nov 13 '08 #1
1 1254
webmaniac schreef:
Hi,

I am trying to write the content of one html page to another. But the
problem is it overwrites everything that other html page has.
For Example, I have two pages. One is 1.html & second is 2.html. There
is a div in 1.html. I want to write that div contents to 2.html.
2.html has some content in it. But when I write to 2.html, the div
content is overwriting everything that is in 2.html and I dont want to
do that.
I am using this to write:
printWin = window.open("2.html","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();

Any Ideas what I am doing wrong here?
Hi,

You probably closed the document before writing to it.
Once closed, subsequent open/write class will start on empty document.

Solution: do not close.

Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
Nov 14 '08 #2

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

Similar topics

3
by: Art | last post by:
NEWBIE ALERT! Esteemed List Participants and Lurkers: (System: P-II 350, 192 meg, Win98 SE, Python 2.2.3, wxPythonWIN32-2.4.1.2-Py22.exe) I'm having a lot of fun getting started with Python...
52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
3
by: PSERVE | last post by:
Is the a way of preventing popups from other sites while your page is loading? -- Regards Nik http://www.itconsultancy.org
2
by: Tom Szabo | last post by:
Hi, >>IE in Windows XP Service Pack 2 has a popup blocker that blocks unsolicited >>popups >>IE (other than Windows XP Service Pack 2) also has many add-ons (Google toolbar, >>Yahoo! toolbar,...
8
by: songstre | last post by:
I would like to write a service that handles certain tasks fro a third party back end. There is an API for the back end that I can use to accomplish this, but there are certain calls I have to make...
4
by: ciprian.dosoftei | last post by:
Hello, I just finished a tutorial website regarding the development of DHTML popups. The site features several examples with downloadable samples. It also feature more complex effects like...
4
by: dd | last post by:
I have a scenario where my popups are being blocked by IE6+ and Firefox. The problem is that although the popup is a direct result of the user clicking on the link (meaning that they WANT the...
1
by: YotamElal | last post by:
Hello, I have a popup problem. When a popup is opened, I want all other popups to close immediatly. (except for its self and it's child popups) Here is my code: code: <!DOCTYPE HTML PUBLIC...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
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: 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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.