Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-30-2012, 07:47 AM   #1
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,114
Way to print one image from a page?

Trying to find out a way to print a selected image from a page.

It's a coupon page, with 14 coupons at the moment. I need to find a way to set it up where when you click on an image, it sends just that image to a printer.

Or better yet, have check boxes to select which to print, then have a print button below.


Anyone know of any easy options off hand?

Thanks
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies
HomegrownCash | GhostCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-30-2012, 08:02 AM   #2
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
You could use jquery to on-click of an image, (hide) all images except the one clicked on, and then fire the print function. That way the page should only print the image desired.

Something like
Code:
$('div.container img').click(function() {
    $('div.container img').hide();
    $(this).show();
    window.print();
});
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-30-2012, 08:29 AM   #3
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,114
Quote:
Originally Posted by potter View Post
You could use jquery to on-click of an image, (hide) all images except the one clicked on, and then fire the print function. That way the page should only print the image desired.

Something like
Code:
$('div.container img').click(function() {
    $('div.container img').hide();
    $(this).show();
    window.print();
});
Hmm...okay. I'll give this a shot first.

Thanks, potter!
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies
HomegrownCash | GhostCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-30-2012, 08:32 AM   #4
livexxx
Confirmed User
 
livexxx's Avatar
 
Industry Role:
Join Date: May 2005
Location: UK
Posts: 1,201
You can do it very easily to print just single elements with jQuery Print Area plugin

http://www.ssdtutorials.com/tutorial...ery-print.html

Code:
	$('.print').click(function() {
		var container = $(this).attr('rel');
		$('#' + container).printArea();
		return false;
	});
The demo on that page has a print button to print named elements on a page. You can create a new CSS element and wrap that around single images as well so that you can click an image and get it to print.

example below :
http://www.gotporn.com/print/
__________________
http://www.webcamalerts.com for auto tweets for web cam operators

Last edited by livexxx; 08-30-2012 at 08:42 AM..
livexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-31-2012, 07:36 AM   #5
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,114
Quote:
Originally Posted by livexxx View Post
You can do it very easily to print just single elements with jQuery Print Area plugin

http://www.ssdtutorials.com/tutorial...ery-print.html

Code:
	$('.print').click(function() {
		var container = $(this).attr('rel');
		$('#' + container).printArea();
		return false;
	});
The demo on that page has a print button to print named elements on a page. You can create a new CSS element and wrap that around single images as well so that you can click an image and get it to print.

example below :
http://www.gotporn.com/print/
Tried this, and it works fine until I put it into my template. I don't get it. Everything is set - the scripts, the div id's, etc.
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies
HomegrownCash | GhostCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-31-2012, 11:24 AM   #6
marlboroack
So Fucking Banned
 
Industry Role:
Join Date: Jul 2010
Location: ☣
Posts: 9,327
Print screen it then paste it in paint then Ctrl- P
marlboroack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-31-2012, 11:38 AM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,773
also take a look at jqprint, i use it for a cms that allows you to only print the source code.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Tube Themes
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.