logo

New Response

« Return to the main article

You are replying to:

  1. Here is a function that we use that does a check first for the object and if it isn't there then does a normal window.print()

    function printReport() {

    if ( !factory.object ) { window.print(); } else { // set page header and footer factory.printing.header = ""; factory.printing.footer = "&d &b www.bluecuda.com &b Page &p of &P"; // setup printer factory.printing.portrait = false; factory.printing.leftMargin = 0.25; factory.printing.topMargin = 0.25; factory.printing.rightMargin = 0.25; factory.printing.bottomMargin = 0.25;

    //print factory.printing.Preview(); }

    }

    Here's an example call to this function from a button:

    <button onClick='printReport();'><img src="/icons/small-printer.gif"> Print</button>

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: