PDA

View Full Version : Create printing option to a web page


Steve87
01-31-2012, 07:08 AM
Hi there,

I am sorry if I am in the wrong section. I am currently on a project and I am requested to work on the university educational portal/website.

I need to create a printing option on a student transcript page to enable the administrator of the portal to print the transcript. I can hardly look for the appropriate way/method to do that. I am working on the PHP and MYSQL for the portal.

Anyone know where to get the proper procedure for that? Thanks in advance.

edbr
01-31-2012, 07:19 AM
with javascript maybe

http://www.htmlgoodies.com/beyond/javascript/article.php/3471121/Print-a-Web-Page-Using-JavaScript.htm

Steve87
01-31-2012, 10:04 AM
I did encounter problem when I try to add in a line of the code:

<A HREF="javascript:window.print()">Print This Result</A>

In the preview of the web page, i did see the hyperlink of
Print This Result and I click it.

It link me to a web page says "Not Found The requested URL /Mentor Mentee System/javascript.window.print() was not found on this server"

How to solve this?

domedia
02-01-2012, 01:17 PM
It's not a link, don't put the JavaScript in the HREF attribute.

Also, it is required that the browser has JavaScript enabled.

mohanraaj
02-22-2012, 12:10 AM
I did encounter problem when I try to add in a line of the code:

<A HREF="javascript:window.print()">Print This Result</A>

In the preview of the web page, i did see the hyperlink of
Print This Result and I click it.

It link me to a web page says "Not Found The requested URL /Mentor Mentee System/javascript.window.print() was not found on this server"

How to solve this?

You dont have to use the javascript in HREF. just try this one

<A HREF="" onClick="javascript:window.print()">Print This Result</A>

this will help you... :)

Steve87
02-22-2012, 08:51 AM
Thanks everyone for replies, I manage to solve my problem. Many thanks :-)

domedia
02-22-2012, 02:16 PM
How did you do it Steve?
Thanks everyone for replies, I manage to solve my problem. Many thanks :-)