>> var newWindow = window.open();
>> newWindow.document.innerHTML = target.innerHTML;
Please provide attribution of quoted material.
<URL:http://jibbering.com/faq/faq_notes/pots1.html>
<URL:http://www.safalra.com/special/googlegroupsreply/>
> "document" doesn't nave "innerHTML" property, use "write()" method
> instead of.
>
> newWindow.document.write(target.innerHTML);
It will not work, because the `innerHTML' property of any DOM object will
always only evaluate to the code of the content, not to the code of the
container. Therefore, one has to write at least:
var newWindow = window.open();
if (newWindow && newWindow.document)
{
newWindow.document.open();
newWindow.document.write(
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"'
+ ' "http://www.w3.org/TR/html4/loose.dtd">'
+ '<html>'
+ target.innerHTML;
+ '<\/html>');
newWindow.document.close();
}
Since the `outerHTML' property has no broad support, there is an inevitable
loss of information to this approach.
PointedEars

Signature
There are two possibilities: Either we are alone in the
universe or we are not. Both are equally terrifying.
-- Arthur C. Clarke
Randy Webb - 30 Apr 2006 06:24 GMT
Thomas 'PointedEars' Lahn said the following on 4/28/2006 5:04 AM:
>>> var newWindow = window.open();
>>> newWindow.document.innerHTML = target.innerHTML;
>
> Please provide attribution of quoted material.
>
> <URL:http://jibbering.com/faq/faq_notes/pots1.html>
Solid reference but at a minimum point a person to the relevant spot in
that document:
<URL: http://jibbering.com/faq/faq_notes/pots1.html#ps1Post>
covers quoting/attributing.
> <URL:http://www.safalra.com/special/googlegroupsreply/>
Irrelevant to the post you replied to.
>> "document" doesn't nave "innerHTML" property, use "write()" method
>> instead of.
[quoted text clipped - 4 lines]
> always only evaluate to the code of the content, not to the code of the
> container. Therefore, one has to write at least:
That does not, at a minimum, satisfy the needs.
> var newWindow = window.open();
> if (newWindow && newWindow.document)
No test to see if the window was closed by a popup blocker?
Nor does the code do anything with Symantec popup blocking code.

Signature
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/