Closed Thread Icon

Topic awaiting preservation: printing with a script (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8870" title="Pages that link to Topic awaiting preservation: printing with a script (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: printing with a script <span class="small">(Page 1 of 1)</span>\

 
Lauw_HG
Obsessive-Compulsive (I) Inmate

From: Jakarta
Insane since: Sep 2003

posted posted 09-26-2003 04:27

hi, i want to print a page with javascript when user click a button..can javascript do this ? and can we set the margins, the tittle with javascript ? .at page setup menu in internet explorer we find margins, header, footer, orientation but can we set up these properties with a script so i want to specifically set this properties only at my page? and when user want to print the page from other website they will use the default setting, help me plzz n thank u for your help...

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 09-26-2003 09:42

In IE, AFAIK you can use the window.print() command

Edit: also check http://www.irt.org/cgi-bin/htwrap?method=and&format=builtin-long&sort=score&config=htdig&restrict=&exclude=&words=window.print
--
Regards,
Elias

[This message has been edited by lallous (edited 09-26-2003).]

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 09-27-2003 11:25

Ok, it sounds like you want to make a seperate stylesheet just for printing. That would be
<link type="text/css" rel="stylesheet"media="print" href="print.css" />
, print.css being the filename.

Lauw_HG
Obsessive-Compulsive (I) Inmate

From: Jakarta
Insane since: Sep 2003

posted posted 09-29-2003 03:54

yes, that's right. but what code should i put on print.css ? i want to setup the margins, header and the footer for my paper. because if we use the default page setup from IE, it put the title of the page as the header n the url as the footer and the margins are too high, it will consume the space of my paper. my clients only want to print the information on 1 page so i would like to free some space. thank you for the responds lallous n nevel

Rinswind 2th
Maniac (V) Inmate

From: Den Haag: The Royal Residence
Insane since: Jul 2000

posted posted 09-29-2003 07:50

There is a very usefull page at ala:
http://www.alistapart.com/stories/goingtoprint/

__________________________________________
"Art has to be forgotten. Beauty must be realized."
Piet Mondriaan

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 09-29-2003 11:48

And of course there's the tutorial: http://www.gurusnetwork.com/tutorials/css/cssprint/cssprint1.html

« BackwardsOnwards »

Show Forum Drop Down Menu