DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Forms - Print Button (http://www.daniweb.com/forums/thread24462.html)

DeborahJT May 27th, 2005 3:57 pm
Forms - Print Button
 
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?

tgreer May 27th, 2005 5:27 pm
Re: Forms - Print Button
 
It's just "print()".

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

DeborahJT May 27th, 2005 6:11 pm
Re: Forms - Print Button
 
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.

DeborahJT May 27th, 2005 6:20 pm
Re: Forms - Print Button
 
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.

tgreer May 27th, 2005 6:32 pm
Re: Forms - Print Button
 
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.

DeborahJT May 27th, 2005 6:42 pm
Re: Forms - Print Button
 
Thanks that's just what I needed.


All times are GMT -4. The time now is 9:55 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC