Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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 :)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:53 PM.


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