Welcome and have a nice stay !       login   register   need help?  

 Page Info

Page Title: Printerfriendly Page
Description: Printerfriendly page from the content of any LDU page
Author: The Sandeman®
Submission Date: 06-04-2006 11:03

 Rating & Comments

View or add comments: (0)
Average members rating: 0



How to make a simple printerfriendly page from the content of any LDU page and print it out..

Paste the following code between the tags

Code :
// hide source code
// hide line numbers

 1  <script language="JavaScript" type="text/javascript">
 2  var AutoPrint = true; // Indien 'false' wordt de pagina niet automatisch uitgeprint
 3  
 4  function PrintPagina(){
 5  if (document.getElementById != null){
 6  var html = '<HTML>n<HEAD>n';
 7  if (document.getElementsByTagName != null){
 8  var headTags = document.getElementsByTagName("head");
 9  if (headTags.length > 0)
10  html += headTags[0].innerHTML;}
11  html += 'n</HE' + 'AD>n<BODY>n';
12  var PrintKlaarElem = document.getElementById("PrintKlaar");
13  if (PrintKlaarElem != null){
14  html += PrintKlaarElem.innerHTML;}
15  html += 'n</BO' + 'DY>n</HT' + 'ML>';
16  var printWin = window.open("","PrintPagina");
17  printWin.document.open();
18  printWin.document.write(html);
19  printWin.document.close();
20  if (AutoPrint)printWin.print();}}
21  </script>




Then just Edit your LDU page, and place in the following code:

Code :
// hide source code
// hide line numbers

1  <div id="PrintKlaar">
2  Everything that you put between the tags is included in the printpage.
3  </div>



Test it with the link below:

Code :
// hide source code
// hide line numbers

1  <a href="javascript:void(PrintPagina())">Print Page</a><br />



If you want a standard button:

Code :
// hide source code
// hide line numbers

1  <form id="PrintMe" name=" PrintMe ">
2  <input type="button" name=" PrintMe" onClick="PrintPagina()" value="Print Page">
3  </form>

``

Or if you want an image instead of plain tekst.

Code :
// hide source code
// hide line numbers

1  <a href="javascript:void(PrintPagina())">img src="datas/users/yourimage "/></a>



Cheers…

Donation:

If you like our free quality work, make a donation by using Paypal and tell us what you would like to see improved on our site for the next few months.

Comments


No comments yet

 Site Activity
Currently online: 0 member(s), 40 guest(s) : All members offline.


 Quick Menu
sitemap
search
galleries
main
forums


 Our Services

Main Projects
Designers For Hire
Unique LDU Skins
LDU Skins For Sale
Seditio Skins For Sale
Templates For Sale


 Statistics
18582 registered members,
1870 topics in forums,
21586 posts in forums,
13589716 pages served since 2004-05-09.
more


 7th Version Design

+++
top