The Pritchard wrote:
I want the user to be able to save the information displayed on a
dynamically created page.
When I write a script like the following:
<SCRIPT>
winNew = window.open("","test");
winNew.document.writeln("Hello World!");
winNew.document.close();
winNew.focus();
</SCRIPT>
I can view it in IExplorer and if I view code I only see the "Hello World"
part.
But when I try to save it, I get the parent code (as I have typed above).
In Netscape navigator I get the "Hello World", which is what I want.
Do I need to change a setting in IExplorer?
Or does IExplorer need different JavaScript code for this to work.
I must use IExplorer.
Dave
When you do File -> Save As... in Internet Explorer, choose "Web Page, HTML
only" rather then "Web Page, complete". If you File -> Save As... the result
of a document.write() to a new window in Internet Explorer as "Web Page,
complete", it does indeed insert a couple of headers, as well as the tags you
left out, in addition to the source of the script that produced the new
window.
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<SCRIPT>
winNew = window.open("","test");
winNew.document.writeln("Hello World!");
winNew.document.close();
winNew.focus();
</SCRIPT>
</BODY></HTML>
This is unusual, but not entirely incorrect behaviour. To obtain a "complete"
Web Page, Internet Explorer would need all the code that led up to the
resulting window. I wonder what it would do with more complex situations
(opened windows that wrote content that opened a window that wrote content
that opened a window).
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html