View Full Version : how to print a page from another page

03-26-2005, 07:36 AM
I am trying to have a print button that would print a text document (rules.txt) without actually bringing up the text document in the browser. (not by my request, but someone I am helping build their site...so please, no "WHY" questions on this one 'cause, I don't know.)

I have no Idea of how to do this. This is some of what I have tried which has failed, so any help would be greatly appreciated...

<input type="button" value="Rules Printout" onClick="window.print(rules.txt)";>

and I also tried this...

<a href="javascript:window.printrules.txt()";><img src="rules.gif"></a>


Imperial Spider

Philip M
03-26-2005, 08:58 AM
Have a look at:-


03-26-2005, 05:35 PM
The info on that page is what I needed.

Much appreciation...

Imperial Spider