Link to home
Start Free TrialLog in
Avatar of DanR
DanR

asked on

onafterprint in Netscape

What I want to do is hide several elements of a page, print the page, then have the elements come back.  Code below.  Unfortunately, the elements come back before the user clicks Print.  I understand that I can fix that in IE 5.5, but I need a solution in Netscape 7.  Anyone know of a way to detect if the user has clicked Print?


     function ReturnTheButtons() {
          document.getElementById('CloseButtonTop').style.visibility = 'visible';
          document.getElementById('CloseButtonBottom').style.visibility = 'visible';
     }
     function PrintThisWindow() {
          document.getElementById('ClickToPrint').style.visibility = 'hidden';
          document.getElementById('InstructionText').style.visibility = 'hidden';
          document.getElementById('CloseButtonTop').style.visibility = 'hidden';
          document.getElementById('CloseButtonBottom').style.visibility = 'hidden';
          window.print();    
          ReturnTheButtons();
     }
ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DanR
DanR

ASKER

Well, I may check that out, but for now, it looks like I'm going to have separate styles for screen and print.

But hey, you tried and I can't remember how to delete a question, so take the points.
Most generous! Thank you!

If you need additional help on this. Post it here :-)

CJ