What do I need to do in order to have a link on a page that will execute the browser's print command?
| SitePoint Sponsor |

What do I need to do in order to have a link on a page that will execute the browser's print command?



That feature can be done using javascript. I found a premade script for you at dynamic drive.Originally Posted by Jip

Thanks Steve - it is greatly appreciated!



No Problem. Feel free to PM me if you need more help in the future.
I would do it something like this.Code:window.onload = function(){ if(!window.print || !document.createTextNode) return; var a = document.getElementById("print"); a.appendChild(document.createTextNode("Print this page")); a.href = "javascript:window.print();"; }HTML Code:<a id="print"></a>
Simon Pieters
Bookmarks