Jump to content

Recommended Posts

You can both do page breaks and omit sections of html with this

 

 

<STYLE TYPE="text/css">

    P.breakhere {page-break-before: always;}

    @media print {

    .cssclsNoPrint {display:none}

    }

 

</STYLE> <br>

<<<snip>>>

Begin html code that is to be printed

<<<snip>>>

<P CLASS='breakhere'>

<<<snip>>>

Begin html code that is to be printed

<<<snip>>>

<P CLASS='breakhere'>

 

<span class="cssclsNoPrint">

stuff you don't want printed here

</span>

 

<span class="cssclsNoPrint">

<script language="Javascript" type="text/javascript">

// This Script puts a Print Screen Button on the page

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, 1);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";

}

}

</script> <script language="Javascript" type="text/javascript">

var NS = (navigator.appName == "Netscape");

var VERSION = parseInt(navigator.appVersion);

if (VERSION > 3) {

    document.write('<form><input type=button value="Print Report" name="Print" onClick="printit()"><\/form>');

}

</script></span>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.