Create a new CSS class that applies to all divthat you are trying to hide for a particular print action, and add a rule to the print style sheet that hides it.
<style type="text/css" media="print">
.print-hidden {
display:none;
}
</style>
Your trigger might look something like this:
<script>
document.getElementById('div1_trigger').onclick = function() {
document.getElementById('div1').className = 'print-hidden';
}
</script>
Assuming you have several partitions, you will also have to handle deleting a class hidden from printing when another partition is triggered.
, display: visible; CSS, , display: block;