Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Function

Status
Not open for further replies.

desiana

Programmer
Oct 31, 2001
23
0
0
MY
I am currently developing a system using JSP. When I need to do printing in my program, I will use the browser's print function but the problem is by using this feature I cannot keep track whether user clicks OK or Cancel button. So I'm thinking of developing my own print function. Is it possible ? How to do that ?
 
You can print a page using javascript but ultimately it is going to have to use the browser to print the pages. The good thing is the you can have your javascript routine to print the pages and also inform a back-end process of the printing. The bad thing is that this in no way prevents the user from directly using a browser's print feature and circumventing your javascript routine.

One thing to understand is that as developers we really have no control over the browser (at least we shouldn't). The best we can do is send the information that we want to be seen. This is a good thing, could you imagine the danger of giving control of the browser to anybody out there writing code? I don't think so.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top