[Seaside] Print only a particular div
Keith Roberts
keith at karsites.net
Wed Jan 2 19:18:57 UTC 2008
I think you may need to specify the chrome for the new
window, possibly the main window toolbar. See this link for
more details:
http://www.w3schools.com/htmldom/met_win_open.asp
What browser are you using? Have you tried Firefox or
Netscape, any Gecko based browser should work fine.
HTH
Keith Roberts
-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
On Thu, 3 Jan 2008, Rajeev Lochan wrote:
> To: Seaside - general discussion <seaside at lists.squeakfoundation.org>
> From: Rajeev Lochan <lochan94 at gmail.com>
> Subject: Re: [Seaside] Print only a particular div
>
> Thanks Philippe for correcting me.
> After some modifications the Js code is
>
>
> printwindowJs
> ^ '
> function chkstate(){
> if(document.readyState=="complete"){window.close()}
> else{setTimeout("chkstate()",2000)}}
>
> function print_win(){
> window.print();chkstate();}
>
>
> function printContent(id){
> str=document.getElementById(id).innerHTML
> newwin=window.open
> ('''',''printwin'',''left=100,top=100,width=400,height=400'')
> newwin.document.write(''<HTML>\n<HEAD>\n'')
> newwin.document.write(''<TITLE>Print Page</TITLE>\n'')
> newwin.document.write(''</HEAD>\n'')
> newwin.document.write(''<BODY onload="print_win()">\n'')
> newwin.document.write(str)
> newwin.document.write(''</BODY>\n'')
> newwin.document.write(''</HTML>\n'')
> newwin.document.close()
> }
>
> '
>
> Now, I am getting a popup browser with the div rendered in
> it. But the automatic printerSelection menu is not coming.
> I hope I am closer than last time.
>
> Regards,
> Rajeev
More information about the seaside
mailing list