Solved

Printing From WebPage

Posted on 2002-07-24
6
212 Views
Last Modified: 2013-12-16
Hie Guys,

I have a question...

"How can i send text directly from my webpage to the client's default printer...be it through jscript or otherwise."

I am looking for a way to do this please help...even a web reference...will suffice

0
Comment
Question by:agexxiii
  • 4
6 Comments
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7174926
0
 
LVL 1

Accepted Solution

by:
eclipsed2k earned 200 total points
ID: 7174945
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 7174977
Any of those scripts is fine but, you have to have the users permission.  

window.print will give you the same functionality as the print from teh browser menu, or the print button.  You cannot control which printer it goes to.  That is under the user's control. It has to be you do not even know if the printer is turned on , or if the user is even connected to a printer.

Cd&
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 10

Expert Comment

by:KenAdney
ID: 7174979
Or more directly:

<a href="Javascript:window.print();">Click here to print.</a>
0
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7175069
I am not sure what colbol means by having users permission but there is something you might want to think about when using Javascripts to print a page.

If the user has java script disabled then the script will not work and thus no printing will take place and if this is a concern for you then what I would suggest is using the ctrl+p command and it does the same thing as the above scrpts and it works with or without javascript enabled.

So my suggestion is to put on your page this line.

"To print this page press "ctrl+p"


just a thought and once again good luck.
0
 
LVL 1

Expert Comment

by:eclipsed2k
ID: 7175192
Rereading colbols comment I think I understand what he is saying and he is correct. If you just want to allow users to print the contents of your page then the above scripts and commands will do just fine howerver if you want it so that when a user enters your page it just starts printing without any user interaction then to the best of knowledge it cannot be done. Even using activeX and or vbscript requires "some" user interaction.

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AdminLTE with wordpress 15 133
Scroll 5 news at a time. 4 33
Background video not displaying in Internet Explorer. 3 37
convert Systemjs to Webpack 3 23
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question