Foros del Web » Programando para Internet » Javascript »

Window.open () .. Carga de pag eterna en FF

Estas en el tema de Window.open () .. Carga de pag eterna en FF en el foro de Javascript en Foros del Web. Hola amigos tengo el siguiente problema ,.. es con el window.open (); Tengo esta funcion; @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código javascript : Ver original function OT_generatorReportPresupuest ( ...
  #1 (permalink)  
Antiguo 25/01/2009, 19:05
Avatar de starmark  
Fecha de Ingreso: junio-2008
Ubicación: Venezuela
Mensajes: 64
Antigüedad: 15 años, 10 meses
Puntos: 0
Window.open () .. Carga de pag eterna en FF

Hola amigos tengo el siguiente problema ,.. es con el window.open ();

Tengo esta funcion;

Código javascript:
Ver original
  1. function OT_generatorReportPresupuest () {
  2.         if ($('tbody_prodsAdded').childNodes.length > 5 ) {
  3.             var newWindow = window.open("presupuestos/presupuesto.html" ,"Presupuesto","toolbar=yes,menubar=yes,location=no,directories=no,scrollbars=yes,resizable=yes");     
  4.                 newWindow.document.write ($('table_productsAded').innerHTML);  
  5.                 newWindow.document.write ("<script language='javascript'>if (document.getElementById('tbody_prodsAdded')) {if (document.getElementById('TrAddedProdButtons')) { document.getElementById('tbody_prodsAdded').removeChild(document.getElementById('TrAddedProdButtons'));}}");
  6.                 newWindow.document.write ("if (document.getElementById('TD_labelsActions') ) {document.getElementById('TR_Labels').removeChild(document.getElementById('TD_labelsActions'));}");
  7.                 newWindow.document.write ("document.getElementById('TD_LabeldsCode').style.borderLeft = '1px solid #999999';");
  8.                 newWindow.document.write ("var total_reg = document.getElementById('tbody_prodsAdded').childNodes.length; for (i=0;i<total_reg;i++) { if (document.getElementById('TdAddedProdActions'+i) ){document.getElementById('TrAddedProdCode'+i).removeChild (document.getElementById('TdAddedProdActions'+i));} {if (document.getElementById('P_cant'+i)) {document.getElementById('P_cant'+i).style.cursor= ''; }}} ");
  9.                 newWindow.document.write ("document.getElementById('TdAddedProdPriceLabelNeto').colSpan = 4;document.getElementById('TdAddedProdPriceLabelIva').colSpan = 4;document.getElementById('TdAddedProdPriceLabelTotalTotal').colSpan = 4;");
  10.                
  11.                 newWindow.document.write ("document.getElementById('TD_LabeldsCode').width = '7%';");
  12.                 newWindow.document.write ("document.getElementById('TD_LabeldsPriceTotal').width = '8%';");
  13.                 newWindow.document.write ("document.getElementById('TD_LabeldsDescrip').width = '25%';");              
  14.                 newWindow.document.write ("</script>");
  15.             }
  16.     }

El problema viene cuando abre la nueva ventana perfecto y me muestra la
informacion deseada . . Pero en FF se queda la pagina como si estubiera
cargando aun cuando el contenido ya esta alli =S ..

Como podria arreglar esto ?
  #2 (permalink)  
Antiguo 26/01/2009, 00:16
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Respuesta: Window.open () .. Carga de pag eterna en FF

Hola:

Eso se arregla cerrando el documento...

ventana = window.open(...);
ventana.document.open();
ventana.documentwrite("<html><body>hola</body></htnl>");
ventana.document.close();

Fíjate que el open y el close nuevo es del objeto document...

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #3 (permalink)  
Antiguo 26/01/2009, 07:07
Avatar de starmark  
Fecha de Ingreso: junio-2008
Ubicación: Venezuela
Mensajes: 64
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: Window.open () .. Carga de pag eterna en FF

Cita:
Iniciado por caricatos Ver Mensaje
Hola:

Eso se arregla cerrando el documento...

ventana = window.open(...);
ventana.document.open();
ventana.documentwrite("<html><body>hola</body></htnl>");
ventana.document.close();

Fíjate que el open y el close nuevo es del objeto document...

Saludos
Sos un tiro caricato .. gracias =) .. Aunq no entiendo bien q hace la funcion
open y close del document ... penc q con colocar las etiquetas <html><body>Mensaje</body></html> .. estaria bien .. Saludos =D
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:05.