File: print.js

package info (click to toggle)
ocsinventory-server 2.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,088 kB
  • sloc: php: 27,462; perl: 8,241; sh: 1,680; sql: 1,355; xml: 1,041; makefile: 34
file content (24 lines) | stat: -rwxr-xr-x 681 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function imprime_zone(titre, obj)

{
// Définie la zone à imprimer
    var zi = document.getElementById(obj).innerHTML;

// Ouvre une nouvelle fenetre
    var f = window.open("", "ZoneImpr", "height=800, width=800, toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");

// Définit le Style de la page
    f.document.body.style.color = '#000000';
    f.document.body.style.backgroundColor = '#FFFFFF';
    f.document.body.style.padding = "10px";

// Ajoute les Données
    f.document.title = titre;
    f.document.body.innerHTML += "" + zi + "";

// Imprime et ferme la fenetre
    f.window.print();
    f.window.close();
    return true;
}