p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   HOw can i add Header and footer? (http://p2p.wrox.com/showthread.php?t=41708)

NinaWilliam April 25th, 2006 04:22 AM

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 :)


All times are GMT -4. The time now is 07:17 PM.

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