![]() |
window.print() ???
Hi to all...
Using the window.print() is there a way i can tell it to print from point a to b on a page? Thanking you in advance Rino |
Sort of.
What you can do is to create your page in "sections", perhaps using <DIV> tags? <DIV id="section1">...</DIV> <DIV id="section2">...</DIV> ... <DIV id="sectionN">...</DIV> Then, to print only one section, change the style of each of the others to display:none and print the entire page. |
Hi RinoDM!!
http://www.codeproject.com/KB/HTML/C...ntPreview.aspx http://www.webreference.com/js/column91/5.html http://www.webreference.com/js/column95/ Note- by putting display:none ,you need to again reset to display:block after printing it and if the page is long you will get some kind of flicker.. Cheers :) vinod |
I'll take a look at try it...
Thank you... Rino |
Well, if you are *REALLY* careful you can do it without changing the *DISPLAY* at all!
That is, you set it up so that ONLY for print media are the other div's turned into display:none. Would only work on browsers that allow className property (MSIE and FF, do, at least), but it's cleaner than having a flicker. |
| All times are GMT -4. The time now is 12:32 PM. |
Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.