Solved

How to print a certain portion of a php page by using a button.

Posted on 2008-10-01
2
316 Views
Last Modified: 2013-12-13
I want to make a specific portion of a php page printable by providing a button. I have a table whose fields are filled by a database query. Plus on this page i have some header and footer. Now i just want a hard copy of that table by clicking a button. How can i do that efficiently?
0
Comment
Question by:sudanshu
2 Comments
 
LVL 3

Accepted Solution

by:
cameroncooke earned 125 total points
ID: 22612244
You can't tell the web browser what to print, but you do have the following options:

1) Use a print stylesheet to style the page for print. You can put styles in the stylesheet to remove unwanted elements just leaving the bits you want to print using display: none, you could also move thing s around etc. See http://www.webcredible.co.uk/user-friendly-resources/css/print-stylesheet.shtml

2) Create a 'Printable Version' button which opens a new window with a version of the page ready for print.
0
 

Author Comment

by:sudanshu
ID: 22632816
it helps me

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

776 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