shachi
06-28-2006, 06:25 PM
1) CODE TITLE: No "Print"s.
2) AUTHOR NAME/NOTES: Shachi Bista.
3) DESCRIPTION: Print a document without showing the "Print" button you created. Can't say that this is really a code but just a snippet I wanted to share.:)
Well, this code is pretty small and easy to install so I think I should place it inside code tags, so here it is:
<input type="button" onclick="window.print();this.style.display='none';" />
That's it.
If you want to reappear the button after some time then just use this:
<input type="button" onclick="window.print();this.style.display='none';setTimeout('function(){this.style.display=\'block\'}', timedelay);" />
NOTE: The part in blue is user configurable.
2) AUTHOR NAME/NOTES: Shachi Bista.
3) DESCRIPTION: Print a document without showing the "Print" button you created. Can't say that this is really a code but just a snippet I wanted to share.:)
Well, this code is pretty small and easy to install so I think I should place it inside code tags, so here it is:
<input type="button" onclick="window.print();this.style.display='none';" />
That's it.
If you want to reappear the button after some time then just use this:
<input type="button" onclick="window.print();this.style.display='none';setTimeout('function(){this.style.display=\'block\'}', timedelay);" />
NOTE: The part in blue is user configurable.