Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/04/2012, 02:02
yasmine27
 
Fecha de Ingreso: noviembre-2010
Mensajes: 93
Antigüedad: 14 años, 4 meses
Puntos: 1
Respuesta: Duda en document.write

Muchas gracias por el consejo!
Intentaré hacerlo así a ver si funciona..la cosa es esta:
Código Javascript:
Ver original
  1. if (<%= variables.get("sT1") %> != 0){
  2.                         document.write ('<tr><td class="negritaIzquierda" colspan="4">Componente 1<\/td><\/tr>');  
  3.                         if (<%= Double.parseDouble(variables.get("cantidad1_1").toString())%> != 0 ) {
  4.                         document.write ('<tr><td>&nbsp;Componente 1a<\/td>');
  5.                         document.write ('<td>' + <%= variables.get("cantidad1_1") %> + '<\/td>');
  6.                         document.write ('<td>' +<%= variables.get("prec1_1") %> + ' &euro;<\/td>');
  7.                         document.write ('<td>');
  8.                         document.write (redondear(<%= variables.get("cantidad1_1") %>*<%= variables.get("prec1_1") %>) + ' &euro;');
  9.                         document.write ('<\/td><\/tr>');
  10.                          }
  11.                          if (<%= Double.parseDouble(variables.get("cantidad1_2").toString())%> != 0 ) {
  12.                          
  13.                         document.write ('<tr><td>&nbsp;Componente 1b<\/td>');
  14.                        
  15.                          }
  16.                 }

La cosa es que solo me saca el componente 1a, una sóla fila y no entiendo el por qué...

Gracias!!