Formating the print this page button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • D'son
    Major General

    • Apr 2008
    • 2577

    Formating the print this page button

    Is there away to format the print this page script so that it will force all printers to print the form in the landscape format? I am using the following 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>');
    }
    </script>
    I keep telling parent to print it in landscape but they just don't get it.
    Reguards
    Ed
    www.dsondesigns.com
    www.marseillesyouthsports.com
    www.300hitter.com
    www.bigjk.net
    How to add JAlbum to your site
  • LadyEye
    General & Forum Moderator

    • Jun 2006
    • 10526

    #2
    Re: Formating the print this page button

    nope, its up to the individuals printer .. gosh you cant control everything .. hee hee

    consider redoing your form in the standard way of doing things .. even if it is two pages .. or shrink it .. etc.

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    02036089024 / United Kingdom
    291916438 / Australia

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


    Comment

    • D'son
      Major General

      • Apr 2008
      • 2577

      #3
      Re: Formating the print this page button

      Thanks Holly, I did go back and remake the page so that it is now oriented so that the user can just print it without changing anything.
      Reguards
      Ed
      www.dsondesigns.com
      www.marseillesyouthsports.com
      www.300hitter.com
      www.bigjk.net
      How to add JAlbum to your site

      Comment

      Working...
      X