www.webdeveloper.com
Results 1 to 4 of 4

Thread: print output

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Location
    Malaysia
    Posts
    3

    print output

    Hello, I'm using this code to print for generate report. But it print all on the windows including print button,main menu
    navbar, and etc.So I really need help if you guys have better code to print output content only.

    Code:
    <input type="button" onClick="window.print()" value="Print The Report"/>


  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,350
    It does exactly what it says it does. It prints the current window (the one that has focus) to the printer.
    Nothing more, nothing less.

    If you want to print content only, you will need to create a window with your content only in the window.

  3. #3
    Join Date
    Apr 2013
    Location
    Malaysia
    Posts
    3
    Did you have a complete coding examples ???

  4. #4
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,264
    Or use a CSS rules for print ! See for exemple this page W3schools.com or nor better or this Javascript Kit page

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles