Toon posts:

Printing with options?

Pagina: 1
Acties:
  • 38 views sinds 30-01-2008

Verwijderd

Topicstarter
Have following code:
Response.Write "<input type='button' value='Print artikel' onclick='window.print()'"
Response.Write " id='button'1 name='button'1>"
it simply places a button on the page, when clicked the page prints.

3 questions:

1. How do I avoid the print dialog to popup, have the page print directly
2. how do I get rid off the header and footer using window.print command
3. How do I avoid the button itself is printed

Gracia experts for helping me out and maybe you could also point me in the right direction for docu bout printing using javascript, first time I have to deal with printing pages 8)7

  • SillyJW
  • Registratie: Januari 2002
  • Laatst online: 22-04 18:09

SillyJW

der Gemutlichkeit

1. & 2. You don't. This is under the users control.

You might be able to generate a PDF with the content you wish to be printed and have that PDF opened in the users browser. This will take care of the header and footer, but there will be a print dialogue.

3. You could use a stylesheet for printmedia and make the button invisible for print.

edit:
unvisible -> invisible. (hey. it is early and this is actually a dutch forum :P)

[ Voor 14% gewijzigd door SillyJW op 10-04-2003 09:29 ]


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 10:39

Janoz

Moderator Devschuur®

!litemod

Dit is een NL forum. Daarnaast is dit makkelijk in de search te vinden. Tot slot staat het ook nog in het verkeerde forum. Dit is namelijk clientside.

1 niet
2 niet
3 door de button te hiden zodra hier op wordt gedrukt

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Dit topic is gesloten.