I have a form that cannot be "submitted" because the server doesn't accept cgi or php. So I've decided to just accept it and have the visitor fill out the form online and then print it and mail it in.

I know I've used the "Print" button before some time ago, but can't remember how I did it. Can you help me?

Recommended Answers

All 5 Replies

It's just "print()".

You can get PHP hosting affordably. Lots of options. I use a company called "ShinySolutions": http://www.shinysolutions.com

This is a site I maintain on a volunteer basis and the hosting is provided free by one of the Board members. So, we don't really have the option of changing right now. I'm trying to get them to get up to speed, but in the meantime, I need to print the form.

Thomas

Now I feel stupid. I created a print button but where in the code does the print() go? Right now the code looks like <input TYPE="button" VALUE="Print">

By the way, thanks for your help. I really appreciate it.

I'm sorry I wasn't more clear. The function you need to call is "print()". So just change your tag to :

<input TYPE="button" VALUE="Print" onClick="window.print();">

When the user clicks the button, the print dialog box will appear.

Thanks that's just what I needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.