View Full Version : Saving a DOM altered web page in Internet Explorer 6

01-14-2005, 11:42 AM
I have a webpage with a number of forms at the top of it. When these are filled in, new paragraphs/tables/links are written to the same page using JavaScript to manipulate and create new nodes.

It was originally tested in Firefox, Netscape and IE6, and works perfectly in all three. The problem comes when the user attempts to save the altered version of the page, ie the one now containing a large amount of extra data. In all browsers other than IE, file->saveas saves a file that inclueds the altered DOM. IE on the other hand only includes the original HTML.

Could anyone please suggest a work around for this, as using an alternative browser is not an option due to the constraints of the work's systems.


01-14-2005, 03:49 PM
I don't think there is one ...

Is there a particular reason why you're concerned about pages saved like this? Maybe you could offer the data in another form - downloadable PDF maybe, something like that?

01-14-2005, 10:40 PM

will return IE's internal representation of the page at the moment, which includes the on-the-fly DOM changes. You could use some ActiveX objects to write that string to a file.

01-17-2005, 11:45 AM
Thank you both of you.

Brothercake, the reason for using this method was that IE is about the only standard(ish) program we have running across the system. The purpose of the page is to allow easy updating of a document that is constantly being changed (hence why we couldn't use a pdf). It also has to be updated/altered by a number of people across the network. Its not an elegant solution, but hopefully it will work.

Jkd, thanks for the outerHTML hint, with a bit of moulding it works beautifully. Unfortunatly I can't use activeX due to the system security but I've found a work around.

Thanks again guys :thumbsup: