Hi,
Another question, Im looking for code that will print only specific parts of the page. maybe put the content into a div tag?
Thanks
Josh
print preview code
Re: print preview code
create a print stylesheet which has something like
* {display:none}
#content {display:block;}
* {display:none}
#content {display:block;}
Re: print preview code
I tried using this
http://javascript.internet.com/miscella ... eview.html
but how do you specify what gets printed?
http://javascript.internet.com/miscella ... eview.html
but how do you specify what gets printed?
Re: print preview code
examples are meant to point you in the right direction, not give you the answer.
Use what was written above
* {display: none}
#content {display: block}
if you have different parts that you want to print.... what's the logical step here?
-K
Use what was written above
* {display: none}
#content {display: block}
if you have different parts that you want to print.... what's the logical step here?
-K
Re: print preview code
I don't necessarily want the answer, but a little more direction. what i have tried was giving the content i want printed a div id, but that does not work. Is that what you meant?
Thanks
Josh
Thanks
Josh
Re: print preview code
You're using tables. Divs and tables act funny with each other because they're essentially trying to do the same thing just in different ways.
Keep messing with it, try different things like giving a table an id instead of using a div and then setting that to display:none;
-K
Keep messing with it, try different things like giving a table an id instead of using a div and then setting that to display:none;
-K
Re: print preview code
ok, this is starting to make much more sense, but now the print button does not do anything. I gave the div an id and removed the table, and the css file has the id info set to none like you said.
Am I supposed to change the print button to something else?
Thanks
Josh
Am I supposed to change the print button to something else?
Thanks
Josh
Re: print preview code
ok, i just realizsed i had to click the print button on the browser. OK, i also changed my print button just to a standard print command. So this is done, now need to fix other one remaining.
Thanks again Kayin for your help
Josh
Thanks again Kayin for your help
Josh