Article View: pl.comp.lang.javascript
Article #50083Re: Drukowanie zawartości nowego okna
From: porneL
Date: Fri, 21 May 2010 21:20
Date: Fri, 21 May 2010 21:20
24 lines
1613 bytes
1613 bytes
On Fri, 21 May 2010 20:16:18 +0100, Czesiu <tonyhouk@o2.pl> wrote:
> Witam!
> Mam taki kod:
> function drukuj(){
> content = document.getElementById("list").innerHTML;
> printwin =
> window.open('','Print','toolbar=no,status=no,width=300,height=200');
> printwin.document.write(content); printwin.window.print();}
>
> W ie dostaje komunikat że obiekt niwe obsługuje tej metody ,a opera
> nic nie robi i błędów w konsoli nie ma!
printwin jest oknem, więc printwin.window jest tak bzdurne jak
window.window.print();
> Co z tym zrobić? A może jest sposób na drukowanie wybranego elementu?
Tak. Zrób arkusz stylów dla media=print, który ukrywa rzeczy, których nie
chcesz drukować.
--
http://pornel.net
this.author = new Geek("porneL");
Technical Details
Message-ID:
<op.vc2qwiugutk0y1@aimac.local>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailReferences:
<3a6c7fda-8ab1-4cfa-97bd-34117b2ce51f@q33g2000vbt.googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: porneL <niusy4@pornel.net> Newsgroups: pl.comp.lang.javascript Subject: Re: Drukowanie zawartości nowego okna Date: Fri, 21 May 2010 22:20:32 +0100 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 24 Message-ID: <op.vc2qwiugutk0y1@aimac.local> References: <3a6c7fda-8ab1-4cfa-97bd-34117b2ce51f@q33g2000vbt.googlegroups.com> NNTP-Posting-Host: 87.114.147.157.plusnet.thn-ag1.dyn.plus.net Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1274476833 16717 87.114.147.157 (21 May 2010 21:20:33 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Fri, 21 May 2010 21:20:33 +0000 (UTC) X-User: pornelspam User-Agent: Opera Mail/10.54 (MacIntel) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit