[thelist] JavaScript: Print Then Close

Christian Heilmann codepo8 at gmail.com
Fri Jan 13 11:10:41 CST 2006


> > > It's all working but closing the new window:
> > >  this.window.close()
> >
> > Shouldn't that just be window.close(); ?
>
> No you can use either. Although window.close(); is the more obvious choice.

Are we quite finished reiterating the same solution over and over again then?

22 hours ago I sent this solution off-list

How does it not work? What does the JavaScript console say?
If you try: http://icant.co.uk/sandbox/printthis.html it won't do in FF:
"Scripts may not close windows that were not opened by script"
But when you open it in  popup:
http://icant.co.uk/sandbox/openthis.html it works nicely here.

And I am still waiting for an explanation how it does not work and so
do all people who answered the same thing in different variations here
:) It might be something totally unrelated to the script... If you
don't get a proper error report it is easy to solve the wrong problem
- anyone who ever had a clever error like "undefined is not defined"
by MSIE knows the issue.

It is not hard to read a thread before answering and it would help to
cut down the signal to noise ratio immensely.

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list