Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
03-06-2005, 02:44 PM #1
[SOLVED] How do I send part of a page to the printer?
I have tried stuff like this:
This text is the only thing I want to print.
<input type='button' onclick='document.layers["print_me"].print()' value='Print'>
The trouble is, it doesn't matter what I put in the "onclick" tag for the input, I just can't get the stuff in the layer to print!! The best I have been able to do so far is 'window.print()', which prints the entire contents of the window. Which is not what I want. I am sure that what I do want to do is actually frustratingly simple, but I just don't know the syntax!
Any help would be much appreciated!
Last edited by mlse; 03-06-2005 at 03:51 PM. Reason: Post solved
03-06-2005, 03:25 PM #2
- Join Date
- Mar 2005
- Portsmouth UK
- Thanked 511 Times in 498 Posts
may assistPHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
<div title="printMe" >
03-06-2005, 03:50 PM #3
Thanks very much.
03-07-2005, 12:54 PM #4
- Join Date
- Jun 2002
- Thanked 256 Times in 252 Posts
03-07-2005, 01:09 PM #5