how to change the visibility of a td so to print or not print it

Posted on 2012-09-14
Last Modified: 2012-09-17
I print 2 copies of my webpage using javascript.
In between the 2 statements I need to swap visibilty of 2 td's so I can display the text differently in the 2 print.The following code doesnt seem to help. thank
<script type="text/javascript">
    function Print() {

       var tblStore = document.getElementById("<%= tblDash.ClientID %>"); = 'none';

       var tblCustomer = document.getElementById("<%= tblCustomerCopy.ClientID %>"); = 'block';

       var clickButton = document.getElementById("<%= lnkHome.ClientID %>");;
Question by:TrialUser
    LVL 75

    Assisted Solution

    by:Michel Plungjan
    The printing is busy when you try to print the second time

    try copying the stuff to a new window for second print
    LVL 23

    Accepted Solution


    You can try onbeforeprint event!

    NOTE: It works only in IE, Firefox and may be safari!

    Hope it helps u...
    LVL 12

    Assisted Solution


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now