mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 22:20:29 +01:00
49 lines
1.5 KiB
Smarty
49 lines
1.5 KiB
Smarty
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>Drucken</title>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript">
|
|
<!--
|
|
function printContent(id){
|
|
str=document.getElementById(id).innerHTML
|
|
newwin=window.open('','printwin','left=100,top=100,width=400,height=400')
|
|
newwin.document.write('<HTML>\n<HEAD>\n')
|
|
newwin.document.write('<TITLE>Print Page</TITLE>\n')
|
|
newwin.document.write('<script>\n')
|
|
newwin.document.write('function chkstate(){\n')
|
|
newwin.document.write('if(document.readyState=="complete"){\n')
|
|
newwin.document.write('window.close()\n')
|
|
newwin.document.write('}\n')
|
|
newwin.document.write('else{\n')
|
|
newwin.document.write('setTimeout("chkstate()",2000)\n')
|
|
newwin.document.write('}\n')
|
|
newwin.document.write('}\n')
|
|
newwin.document.write('function print_win(){\n')
|
|
newwin.document.write('window.print();\n')
|
|
newwin.document.write('chkstate();\n')
|
|
newwin.document.write('}\n')
|
|
newwin.document.write('<\/script>\n')
|
|
newwin.document.write('</HEAD>\n')
|
|
newwin.document.write('<BODY onload="print_win()">\n')
|
|
newwin.document.write(str)
|
|
newwin.document.write('</BODY>\n')
|
|
newwin.document.write('</HTML>\n')
|
|
newwin.document.close()
|
|
}
|
|
//-->
|
|
</script>
|
|
<button onclick="printContent('print_[ID]')">Drucken</button>
|
|
<div id="print_[ID]">
|
|
[PRINT]
|
|
</div>
|
|
<button onclick="printContent('print_[ID]')">Drucken</button>
|
|
</body>
|
|
</html>
|
|
|
|
|