Printing an image in the browser page

M

Mo

Hi,

I like to print a barcode gif image (no header, footer, etc) when the
user click on a button. any ideas on how this can be done?

Thanks,
Mo
 
G

Guest

This can be done with CSS.. you could assign the header / footer etc with
MEDIA=SCREEN and barcode with media=screen,print

http://www.w3schools.com/css/css_mediatypes.asp
http://www.meyerweb.com/eric/articles/webrev/200001.html

If you need to dynamically hide different regions of screen during print

window.onbeforeprint() & window.onafterprint() events will
help.. this works great in IE .. not sure about the compatibility

in window.onbeforeprint() , hide the elements you dont want to print and
window.onafterprint() display them again..

The screen doesnt doesnt get hidden-shown/blinks for the users eyes..
but this prevents from printing the elements you hide

http://msdn.microsoft.com/library/d...thor/dhtml/reference/events/onbeforeprint.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top