Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing from HTML?

    My question has to do with printing from within a web form. Can it be done with HTML? Something like:


    -----------------------------------------------------------------
    <P><INPUT TYPE=reset VALUE="Reset" name=reset><INPUT TYPE=submit NAME=print VALUE="Print Your Information"></P>
    -----------------------------------------------------------------


    The "Reset" is there in case they make a mistake when filling out the form. I need to know what to substitute in place of "NAME=print"

    Gino J. Piazza

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Do you mean can you send a page to the printer when you click on a certain button? Or do you mean can you send text to the screen?

    I am assuming you mean printing a page. I don't know how you can do it from a input button, but you can do it from a link, like this:
    Code:
    <a href="javascript:window.print()">Print this page</a>
    HTH, Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •