Bonjour,

Je voudrais pouvoir imprimer juste le contenu d'un tableau.
J'ai trouvé ce un script mais il ne marche pas, il m'ouvre bien un popup mais elle reste blanche ??
Voila une patie de mon code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
?>
 
<!-- Product info -->
 
 
<table border="0" cellspacing="0" cellpadding="0" width="580" align="center" >						 
						  <tr><td  height="27" style="padding-left:5px; " class="ml1" id="PSR_f1">
 
						 <!-- Products Name --> 
 
						 <div class="ml1"><?=$j[1][text]?></div>
 
 
						  </td>
						  <td width="307" align="right">
						  <script language="javascript">
// ******************************************************************
// Impression d'une zone DOM: IE5+ Mozilla NN6 Win
// pascal.itos@wanadoo.fr
// http://www.dev35.com
// ******************************************************************
function PSR_imprimer () {
	var PSR_f1 = null;
	var PSR_content=document.getElementById('PSR_print').parentNode.innerHTML;
	var PSR_title=document.getElementsByTagName('title')[0].innerText;
	if (PSR_f1) {if(!PSR_f1.closed) PSR_f1.close();}
	PSR_f1 = window.open ('',"PSR_f1", "height=500,width=600,menubar=yes,scrollbars=yes,resizable=yes,,left=10,top=10");  ;
	PSR_f1.document.open();
	PSR_f1.document.write("<html><head><title>" + PSR_title + "</title></head><body bgcolor='#ffffff'>"+PSR_content+"</body></html>");
	PSR_f1.document.close();
	PSR_f1.document.getElementById('PSR_print').style.visibility='hidden';
	PSR_f1.focus();
}
if ( window.name != "PSR_f1" && document.body.parentNode ) { 
  document.write ("<div align='right' id='PSR_print'><img onclick='PSR_imprimer();'  src='images/imprimer.gif' style='cursor:pointer'></div>");
}
</script>
</td>						  
 
						  <td width="53" align="right"><a href="mailto:"><img src="images/iconemail.png" alt="en parler à un ami" name="iconemail" border="0" /></a>&nbsp;&nbsp;&nbsp;</td>
					    </tr>
						  <tr><td height="1" colspan="3" bgcolor="#E6E6E6"></td></tr>
						  <tr><td height="3" colspan="3"></td></tr>
						  <tr><td width="220" align="center" id="PSR_content">
 
						  <?=$j[0][text]?><br />
 
 
 
 
						  </td>
 
						  <td colspan="2" style="padding-left:8px; padding-right:8px;"><br style="line-height:1px;" id="PSR_content"><br style="line-height:4px;">
 
 
						<span class="norm"><? echo  $new_products[$i-1] ;?></span><br />
 
 
						  <br style="line-height:1px;">
						  <br style="line-height:4px;"></td>
						  </tr>
						  <tr><td height="3" colspan="3"></td></tr>
						  <tr><td height="1" colspan="3" bgcolor="#E6E6E6"></td></tr>
						 </table>
Pouvez-vous méclairer ou me donner une piste?
J'ai aussi essayé avec les css 'print' mais cela ne fonctionnait pas non plus.
Je n'ai pas trouvé d'explication assez claires alors j'essaie en java!
Merci de votre aide.