browser printing

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

browser printing

Post by aceconcepts »

Hi,

I have been able to print using the following code:

Code: Select all

<A class="blue" HREF="javascript:window.print()">Print This Page</A>
This is fine, however, when i print using this method the url of the page is printed top right of the page. Basically i dont want the url to appear.

How can i print so that no url is printed?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

you could create a PDF and print that
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: browser printing

Post by volka »

aceconcepts wrote:This is fine, however, when i print using this method the url of the page is printed top right of the page. Basically i dont want the url to appear.

How can i print so that no url is printed?
It's a browser setting that can't be changed by server-side php. That's why you had to add
aceconcepts wrote:<A class="blue" HREF="javascript:window.print()">Print This Page</A>
javascript (i.e. client-side) code to the link.

What browser do you use?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Moved to Client Side.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

This has been asked before. What you are trying to get rid of is a Page Setup -> Header setting. That is not controlled by the code, but by the browser.
Post Reply