Print part of page - Nyt projekt
×
Hjemmeside
Accordions
Accordions
simple Accordion
QA Accordion
Operational Accordion
Side 19
Miscellaneous
Miscellaneous
Information buttons
Live chat
Print part of page
Side 14
Calendars
Side 2
Side 3
Database
Something about databases
Side 4
Side 18
download
medfilter
Side 22
Title
×
Hjemmeside
Accordions
Accordions
simple Accordion
QA Accordion
Operational Accordion
Side 19
Miscellaneous
Miscellaneous
Information buttons
Live chat
Print part of page
Side 14
Calendars
Side 2
Side 3
Database
Something about databases
Side 4
Side 18
download
medfilter
Side 22
Gå til indhold
Miscellaneous
Div gallery:
Print
Div Text:
Print
This is to show how you can ( on the client side ) print part of a page.
This could be used when you don't want a printout to contain also the template and other stuff that is shown on the screen.
It is not much code needed :
<script>
printDivCSS = new String ('<link href="myprintstyle.css" rel="stylesheet" type="text/css">')
function printDiv(divId) {
window.frames["print_frame"].document.body.innerHTML=printDivCSS + document.getElementById(divId).innerHTML;
window.frames["print_frame"].window.focus();
window.frames["print_frame"].window.print();
}
</script>
<br><br>
<b>Div gallery:</b> <a href="javascript:printDiv('imPageRowContent_1')">Print</a><br>
<br>
<b>Div Text:</b> <a href="javascript:printDiv('imPageRowContent_3')">Print</a><br>
<br>
<iframe name="print_frame" width="0" height="0" frameborder="0" src="about:blank"></iframe>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
who_is_logged(); echo $user['realname']; ?>
Tilbage til indhold
Du skal aktivere JavaScript for at bruge denne hjemmeside.