Retroceder   Foros del Web > Programación para sitios web > Javascript

Respuesta
 
Herramientas Desplegado
Antiguo 01-may-2008, 08:16   #1 (permalink)
nyarko ha deshabilitado el karma
 
Fecha de Ingreso: enero-2007
Mensajes: 54
imprimir() no me funciona en IE7

Hola amigos tengo esta funcion en javascript que imprime una porcion de la pagina.
El problema es que no me imprime en IE7 y si en Firefox

En IE7 simplemente se habre y se cierra como si se olvidara de hacer el print()

Cita:
function imprimir()
{
var ven_im = window.open('GEN','_blank','width=780,left=150');
ven_im.document.write('<html><head><title>Imprimir </title><link type="text/css" href="css/basico.css" rel="stylesheet" /></head><body>' + document.getElementById('imprimir').innerHTML + '</body></html>');
ven_im.print();
ven_im.close();
}
Gracias
nyarko está desconectado   Responder Citando
Antiguo 03-may-2008, 17:05   #2 (permalink)
nyarko ha deshabilitado el karma
 
Fecha de Ingreso: enero-2007
Mensajes: 54
Re: imprimir() no me funciona en IE7

nadie contesta?
nyarko está desconectado   Responder Citando
Antiguo 03-may-2008, 17:18   #3 (permalink)
albertcito ha deshabilitado el karma
 
Fecha de Ingreso: diciembre-2007
Mensajes: 44
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();

albertcito está desconectado   Responder Citando
Respuesta

No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 20:05.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93