Forum Moderators: phranque
Can someone recommend a simple walkthrough and/or piece of code where I can do this and have it link to an email and a print gif I have already made?
Thanks in advance
<script type="text/javascript">
document.write('<a href="#" onClick="window.print(); return false;"><img src="your-print-image.gif"><\/a>');
</script>
By surrounding it in the script declaration, it will only appear if Javascript is enabled. You can simply do
<a href="#" onClick="window.print(); return false;"><img src="yourimage.gif"></a>
But it will always appear, and won't work if Javascript is disabled, which may confuse the user.
The email a page I've just never had a need to implement, but I know there are many "email this page" Javascripts out there, keep looking.