Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript HTML
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 8: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 Smile | :) . 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 at 17-Jan-13 16:24pm
Good points :-D
Sergey Alexandrovich Kryukov at 17-Jan-13 16:41pm
Thank you, Espen.
Manas Bhardwaj at 17-Jan-13 16:55pm
Good answer +5!
Sergey Alexandrovich Kryukov at 17-Jan-13 16:57pm
Thank you, Manas.
Adam R Harris at 17-Jan-13 17:47pm
Good answer, my 5.
Sergey Alexandrovich Kryukov at 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
0 Sergey Alexandrovich Kryukov 363
1 OriginalGriff 344
2 George Jonsson 238
3 Shemeemsha RA 148
4 Animesh Datta 130
0 OriginalGriff 6,179
1 Sergey Alexandrovich Kryukov 5,616
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522

Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2014
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