Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/05/2008, 17:18
albertcito
 
Fecha de Ingreso: diciembre-2007
Mensajes: 169
Antigüedad: 16 años, 5 meses
Puntos: 6
De acuerdo Re: imprimir() no me funciona en IE7

Yo tengo un código que hice una vez a mi me funciono sin problemas, aun me funciona en iexplore!!

Aquí esta el javascript:
Código PHP:
function imprimir()
{    
    var 
width=800;
    var 
height=430;
    var 
from_top=100;
    var 
from_left=150;
    var 
toolbar='no';
    var 
location='no';
    var 
directories='no';
    var 
status='no';
    var 
menubar='no';
    var 
scrollbars='yes';
    var 
resizable='yes';
    var 
atts='width='+width+'show,height='+height+',top='+from_top+',screenY=';
    
atts+= from_top+',left='+from_left+',screenX='+from_left+',toolbar='+toolbar;
    
atts+=',location='+location+',directories='+directories+',status='+status;
    
atts+=',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable;
    
    
newwindow2=window.open('','win_name',atts);    
    var 
tmp newwindow2.document;
    
    
tmp.write('<html><head><title>Titulo de Ventana</title>');
    
tmp.write('</head><body onload="javascript:window.print();">');    
    
tmp.write('<table width="740" cellpadding="3" cellspacing="1" border="1" style:"border: solid" >     \
                  <tr> \
                    <td height="30" width="120">Producto</td> \
                    <td height="30" width="400">Informaci&oacute;n</td> \
                    <td height="30" width="90">Precio</td> \
                  </tr> \
            </table> '
);
    
tmp.write('</body></html>');
    
tmp.close();