Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print buttons. Making them print.

Status
Not open for further replies.

UncleMortis

Programmer
Jan 28, 2003
120
AU
I've made a couple of forms for a website I'm working on. I don't have access to cgi script however and the way I saw around this was to just have the person print it out and fill it in. On relection, I realised it'd just be easy to have the person fill it out online and then press a print button. I can make the buttons, I just need the info the button needs so it knows to start the print process. Any help would be great :D.
 
for html it's

<a href=&quot;javascript:print(document)&quot;><img scr=&quot;yourbutton&quot;></a>
 
UncleMortis,

If it's not something that has to be secure and you want it e-mailed or otherwise manipulated, this might help: faq215-3358

Cheers,
[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Yes that was helpful. I don't need anything that's secure but at the same time, I just want a print button. I'm unable to have a secure site and because there will be credit card numbers, I thought the best way around that is just to make the form printable and then they send it to a snail mail address. I'm able to make a send and reset button in a form. I've noticed so far though that I'm needing to make the print button in javascript. Is there any easier way to go, IE: making it the same way and using the same type of command that the send and reset button have that come with making a form? Thanks for the info so far.
 
Well, babel's answer is pretty much the easiest way to go.

Cheers,
[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
I found out how to do it, thanks for the info guys. I've put it in here in case anyone else is after something similar.

<input type=&quot;button&quot; value=&quot;Print this page&quot; onClick=&quot;window.print()&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top