Print from a page
Page 1 of 1
smith01




Posts: 337
Location: A Diner
PostPosted: Tue, 2nd Nov 2010 23:04    Post subject: Print from a page
I'd like to make a link that prompts the user with a printing dialogue. How can this added to a simple html code such as this:

Code:

<A href="files/coupon-print.jpg" target=_blank><IMG alt="coupon" src="files/coupon.jpg"></A>


-0
Back to top
garus
VIP Member



Posts: 34200

PostPosted: Tue, 2nd Nov 2010 23:06    Post subject:
snip


Last edited by garus on Tue, 27th Aug 2024 21:34; edited 1 time in total
Back to top
smith01




Posts: 337
Location: A Diner
PostPosted: Tue, 2nd Nov 2010 23:16    Post subject:
Doesn't work. Opens the printable image in a new window without a print popup. Any ideas?

EDIT: it works only if I put it in a new blank html file, but I'm trying to embed it inside of a div.


-0
Back to top
garus
VIP Member



Posts: 34200

PostPosted: Tue, 2nd Nov 2010 23:21    Post subject:
snip


Last edited by garus on Tue, 27th Aug 2024 21:34; edited 1 time in total
Back to top
smith01




Posts: 337
Location: A Diner
PostPosted: Tue, 2nd Nov 2010 23:24    Post subject:
garus wrote:
So what exactly are you trying to print? Just that linked image?


Yes but I almost nailed it with:

Code:
<A href="javascript:window.print()">blabla</a>


This actually pops the print dialogue, but will print a blank page.

I basically want a bigger picture to open in a new window and prompt the user with a printing dialogue.


-0
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group