Feedback on: irt.org FAQ Knowledge Base Q1489
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
I did submit a similar question recently:
"How do I print TWO OR MORE DIFFERENT PAGES generated using document.write()?"
The problem: The browser will print the last one generated, or sometimes the generating page. I believe I have found a solution in the meantime. Instead of e.g.
> x[pagenum] = open();
I put
> x[pagenum] = open("text/html","replace");
The browsers behave differently. MSIE will open each "page" in different windows. Netscape opens all the pages in the same window (and gives an error message: file "text/html" cannot be found, or something -- which can be ignored).
This works for me. But I would like to get rid of the error message.
Mike L. Griebel
Worth:
Worth reading
Technical:
Not technical enough
Comments:
No explanation why this should be this way.
Why the code needs to be output into a separate window.
Worth:
Worth reading
Technical:
Not technical enough
Comments:
For some reasons explained, a new window has to be opened. An attempt to close it using win1.close() is ignored by NC4.75
Does the print() somehow disables close() in NC?
Also if the print() is called twice on the same page, only the second call is executed in NC.
Worth:
Very worth reading
Comments:
This made my whole day. I was trying to solve a completely different, but apparently related problem. To illustrate, save the following script to a file and open it in a NETSCAPE 4.7x browser. My original version did NOT have the document.open() and document.close() statements and the resulting popup window did not display the contents completely. It was very frustrating, especially when IE *DID* display it correctly!
<script language="JavaScript">
</script>
Worth:
Very worth reading
Length:
Just right
Technical:
Just right
Comments:
This was exactly what I was looking for. Thanks for the tip. It worked perfectly when I added the document.close();