Results 1 to 11 of 11

Thread: Print This Page Button
      
   

  1. #1
    davidlee9 is offline Sergeant
    Join Date
    Feb 2006
    Posts
    25

    Default Print This Page Button

    How can I add a "Print This Page" button to a form?

    David

  2. #2
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: Print This Page Button

    Hi, try popping the script below in a html box & preview. Should be like the one on this page as a sample. LINK

    Code:
    <SCRIPT Language="Javascript">
    
    function printit(){  
    if (window.print) {
        window.print() ;  
    } else {
        var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
        WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
    }
    }
    </script>
    
    <SCRIPT Language="Javascript">  
    var NS = (navigator.appName == "Netscape");
    var VERSION = parseInt(navigator.appVersion);
    if (VERSION > 3) {
        document.write('<form><input type=button value="Print this Page" name="Print" onClick="printit()"></form>');        
    }
    /*
    This script is written by(www.webbiesite.com)
    Use, visit dynamicdrive.com
    */
    </script>

  3. #3
    davidlee9 is offline Sergeant
    Join Date
    Feb 2006
    Posts
    25

    Default Re: Print This Page Button

    Dear Chris:

    I tried your suggestion and it works except I get extraneous stuff. See:

    www.choicesandhope.com/contribute1.html

    Any suggestions?

    David Lee
    davidlee9****.com

  4. #4
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: Print This Page Button

    Hi Folks,

    I have already created a thread after much reading of other threads but just maybe this thread would be able to offer reply.

    As you have got the page to print this page in its completed form. Is there now a way one may receive the same by using a submit button?

  5. #5
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: Print This Page Button

    Hi, if you need to print just an area of a page/form, you have 2 choices.
    1. create a page with just the text & form elements you want on it & direct a visitor to this page. (Or a pop up)
    2. Or place the newly created page as above with text & form in to an iframe. with a print button on the iframe page.

    Hi Rob, if you are thinking of receiving an email & the visitor getting a print out? You might have to ask Naval if this is possible. (Not sure myself) But i cant see a reason not to have just 2 buttons. Set the page up as a normal form for emails with a submit button. Then just add a print button as well. (Just an idea)

    Good luck.

  6. #6
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: Print This Page Button

    Hi Chris,

    Thanks for speedy reply.

    The page is much as you say it.

    http://www.gnjgf.co.za/domtour.php is an entry form that I would like to receive on completion by the entrant using the option of "submit" rather than currently complete, print, sign and fax so as to get it to me.

    I f you guys in this thread could get the page to print then maybe it is just a script that needs some tweaking in order it can be mailed?

    Thanks again for your advice

  7. #7
    Join Date
    Feb 2006
    Location
    Earth
    Posts
    8,721

    Default Re: Print This Page Button

    Hi Rob, i would leave your form page as it is & just knock up another page with only what you want to print & put a link on the form page to a printable version. When they click on this, a popup with the form on will appear with a print button. Bit like this page, but in a pop up style.
    The nice thing about this is you can ask them to fill the form in & then print it out for signing & posting via mail.

  8. #8
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Print This Page Button

    I believe that ROB is reffering to recieving an email, with the form layout as it is in the page, and already filled in with the users details. This is possible, but only with custom coded html email. Easy to do, hard to explain. It requires (depending on the form complexity) 3 - 4 hrs of work.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  9. #9
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Thumbs up Re: Print This Page Button

    Hi George,

    I hope you are keeping well.

    You are correct in that i do want to recieve it via email which for those that know is easy.
    1. I enquire why it is called a "coded" html and not just an html?
    2. Once this html coded or not is created would I be able to read it learn form it and develop other such pages on my own - not being as programe minded and fleunt in the respective languages?
    3. If there is a way in which I can learn to do it I would appreciate some guide lines if that is not to much of a problem?
    I look forward to your responses

  10. #10
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: Print This Page Button

    Basically, you need to know html and php coding. It has to be coded html means that this is not a html email that you can create with a html editor: it needs to merge the php data sent by the user in the html code. The reult is html, with the actual values that the user sent. This html code is then sent as email.

    I am not sure if you can learn how to do it, it is rather complicated. Sure you can if you have the time. Teach you ? a bit difficult.

    Guidelines: any html email tutorial on the net. After you have learnt how to create html emails, you need to learn how to do it with PHP (because you will have to insert php values in the html code). Last you need to send this html email, which cannot be done with the scripts that you can find here on the forum, but can be done with many other scripts that you can find on the net.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!


  11. #11
    Rob (SA)'s Avatar
    Rob (SA) is offline Lieutenant Colonel
    Join Date
    Nov 2006
    Location
    Centurion, South Africa
    Posts
    580

    Default Re: Print This Page Button

    Hi George,

    Thanks for the good news. I am glad I can now look at n option to get this to work.

    Some things I would like you to consider in preparing a quotation for me are:

    1. Some data needs to be changed periodically and I would like to be able to access it to make such changes myself.
    2. The data (inputs) from this form will ultimatly be directed to a data base.
    3. If I change the look of the page the basics (the html) does not differ.
    I am sure other details can be sorted later. Please direct your quote to the email previously used. Failure to that use the feedback form on my website to make contact via email

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49