1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    St. Loomis, MO
    Rep Power

    Sending data to the printer includes filename, date, & page#

    <script type="text/javascript">
    //	---------------- checkPrint() fn ------------
    	function checkPrint() {
    	  checkDate = document.getElementById('chkDt').value;
    	  checkPayTo = document.getElementById('chkPayTo').value;
    	  checkAmount = document.getElementById('chkAmt').value;
    	  checkDollars = document.getElementById('chkDollars').value;
    	  checkMemo = document.getElementById('chkMemo').value;
    	  document.writeln(checkDate + "<br />");
    	  document.writeln(checkPayTo + "<br />");
    	  document.writeln(checkAmount + "<br />");
    	  document.writeln(checkDollars + "<br />");
    	  document.writeln(checkMemo + "<br />");
    	}//========  endOf checkPrint() fn  ========
                <input type='text' id='chkDt' value='' size='12'/><br />
    	  pay to the order of 
                <input type='text' id='chkPayTo' value='' size='35' /><br />
    	  dollar amount
    	    <input type'text' id='chkAmt' value='0' size='10' /><br />
    	  dollars text
    	    <input type='text' id='chkDollars' value='' size='50' /><br />
    	    <input type='text' id='chkMemo' value='' size='50' /><br />
    For a quick & dirty way to print the data (Date, Pay To, Amount, Amount Text, & Memo) on a blank check (paper size 8.5 x 11) the above code seems to work except that the printer prints the filename in the upper right-hand corner, the page number in the lower left-hand corner, and the date & time in the lower right-hand corner.

    If I can avoid the extra stuff in the corners I can go ahead with the formatting to fill-in blank checks.

    Any clues on how to prevent the unwanted stuff in the corners?
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    USA (verifiably)
    Rep Power
    Welcome back to DevShed Forums, abacus.

    You can't do that with JavaScript. You would need to manually change your web browser's printer settings.

    What I might do is create a new (additional) Firefox profile just for this purpose.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    St. Loomis, MO
    Rep Power
    Kravvitz, Thank you !

    I don't plan on printing many checks, so your suggestion is a good quick-fix.

    Didn't know that I could mod Firefox > File > Page Setup > Margins & Header/Footer to set URL and so on to -- blank --.

    .. a little bit of CSS & I'll be up & running.

    Thanks again!

IMN logo majestic logo threadwatch logo seochat tools logo