Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 25th, 2006, 04:22 AM
Authorized User
 
Join Date: Mar 2006
Location: Doha, , Qatar.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default HOw can i add Header and footer?

HOw can i add Header and footer?

Hi i am using javascript code to print a datagrid in my page..is there a way to add header and footer in the document like a title on the header and page number in the footer?

this is the function am calling t print:


            // quick browser tests
            var ns4 = (document.layers) ? true : false;
            var ie4 = (document.all && !document.getElementById) ? true : false;
            var ie5 = (document.all && document.getElementById) ? true : false;
            var ns6 = (!document.all && document.getElementById) ? true : false;

            function show(sw,obj) {
                // show/hide the divisions
                if (sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'visible';
                if (!sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'hidden';
                if (sw && ns4) document.layers[obj].visibility = 'visible';
                if (!sw && ns4) document.layers[obj].visibility = 'hidden';
            }
            // End -->

        //Print datagrid only function (print button 1)
            function CallPrint(strid)
            {
            show(false,'srcPnl');
            var prtContent = document.getElementById(strid);
            var WinPrint =
            window.open('','','letf=0,top=0,width=1,height=1,t oolbar=0,scrollbars=0,status=0');
            WinPrint.document.write(prtContent.innerHTML);
            WinPrint.document.close();
            WinPrint.focus();
            WinPrint.print();
            show(true,'srcPnl');
            WinPrint.close();
            }




Happy Programming :)
__________________
Happy Programming :)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking Header and/or Footer x_ray Word VBA 1 January 2nd, 2007 01:02 AM
header footer zaman1111 JSP Basics 0 July 28th, 2005 05:00 PM
addin a header and footer rom XSLT 0 July 28th, 2005 03:24 AM
Regarding Word header and footer Hari_Word General .NET 0 November 19th, 2004 06:22 AM
can footer value show in header? yancyn Crystal Reports 0 August 5th, 2004 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.