Of course you only should use Javascript, if you can
rely on it, meaning that you know that every user has JS enabled. Else it would be some kind of unfair.
I mean the most easiest solution would be, to print just a hint beneath the form that he (the user) can print out this page and of course the form by clicking on the print button in the browser.
If this is not what you are looking for - for whatever reason - than you may add a checkbox to your form like this:
<input type="checkbox" name="print" /><label>Print this!</label>
If the user checks this and submits the form, you could show the content again in a printer-friendly way, i.e. with a different stylesheet.
You could also create a pdf-document and send this via mail to the user. But this will maybe go too far...
If you want to stay with the JS-solution than you could place the hint, which I mentioned in the second paragraph, in the the <noscript>-Tag for providing some information to users with JS disabled.
-- Cheers Torsten
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php