Click here to Skip to main content
13,254,366 members (58,767 online)
Rate this:
Please Sign up or sign in to vote.
See more:

How to write a print fucntionality in javascript and html. when i click on the Print button; it has to print the map on the browser. this is related to GIS website.
Posted 17-Jan-13 9:28am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see:[^],[^],[^].

You can find a lot more:[^].

I would give you some advice. You can trust your user more: this is the one who knows when to print and how. However, you need to provide a "printable version" of the data presented on the page, which does not have to be the page itself. A print on the page and a Web page are very different kinds of media. For example, it's totally pointless to print check boxes, text input controls, as the user's click on paper won't work anyway :-). But you need to print corresponding data.

One of the nice ways for presenting the "printable version" in an integral and transparent way, is CSS @media feature. You can provide the same content, but use different CSS rules to hide are re-arrange some elements depending on the media. Please see:[^],[^],[^].

Good luck,
Espen Harlinn 17-Jan-13 16:24pm
Good points :-D
Sergey Alexandrovich Kryukov 17-Jan-13 16:41pm
Thank you, Espen.
Manas Bhardwaj 17-Jan-13 16:55pm
Good answer +5!
Sergey Alexandrovich Kryukov 17-Jan-13 16:57pm
Thank you, Manas.
Adam R Harris 17-Jan-13 17:47pm
Good answer, my 5.
Sergey Alexandrovich Kryukov 17-Jan-13 17:52pm
Thank you, Adam.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100