PDA

View Full Version : HTML Printing with javascript issues



stebesplace
Feb 19th, 2003, 05:57 PM
If you visit: http://www.lucidapple.com/datawhse/test.print.htm
login: user
Pass: cartech

You can examine the problem I am having.



I have a menu in a <div> that I want to have removed for printing. I have setup a CSS link to a print only style sheet. It works in removing the top table with the images in, but fails to remove the menu that I have in the <div> even though I belive I have correctly coded it right. Does anyone know why this is not working propperly? No matter how or what method i use to try and get rid of this menu, wether CSS, or javascript, it always remains. It seems that it takes over the entire page.

I am all tapped out of ideas. I have it setup using stylesheets for print media, and that works to remove the table I have, but it fails to remove the menu. If you know what the problem is, please let me know.

Thank you. I may up the points of this gets resolved since this is a tough issue.

-Steve

Roy Sinclair
Feb 20th, 2003, 07:58 PM
Since you mention that it's a menu which is refusing the disappear I suspect the problem is that the menu uses elements with "position:absolute" which means those items don't have a "containing block", ie. the <div> you mentioned. You need to make sure your style sheet for printed media covers the classes and/or id's used in the menu system individually.

stebesplace
Feb 20th, 2003, 10:52 PM
Originally posted by Roy Sinclair
Since you mention that it's a menu which is refusing the disappear I suspect the problem is that the menu uses elements with "position:absolute" which means those items don't have a "containing block", ie. the <div> you mentioned. You need to make sure your style sheet for printed media covers the classes and/or id's used in the menu system individually.

Ok, but how would i declare tags for each element, elemt being the images? I mean in the .js files, I don't know where the elements per say are. . .or where i can declare id's which then could be pointed to from the stylesheet. . .

this is all very messed up. . .

i have tried other menu things, like AJMenu, but have to pay for those, and I am not in the mood to be paying. Those work though, for my needs with the printing issues. . .

-Steve

Roy Sinclair
Feb 21st, 2003, 08:08 PM
Add a style sheet class to all those items, then you can control the printing of all those items using that class.

ie. <div id="someelement" style="..."> should become <div id="someelement" class="NoPrinting" style="...">

or if your elements already have class styles (class="menuClass") you just add the new class (class="NoPrinting menuClass").

stebesplace
Feb 21st, 2003, 08:20 PM
Originally posted by Roy Sinclair
Add a style sheet class to all those items, then you can control the printing of all those items using that class.

ie. <div id="someelement" style="..."> should become <div id="someelement" class="NoPrinting" style="...">

or if your elements already have class styles (class="menuClass") you just add the new class (class="NoPrinting menuClass").

I am going to try this, but as you can see on the current version of the site, I have put in a new menu system and printing feature using stylesheet's. It borders on what you are talking about.

Thanks,


-Steve