Foros del Web » Creando para Internet » CSS »

Como imprimo desde un for

Estas en el tema de Como imprimo desde un for en el foro de CSS en Foros del Web. Hola en el Formulario muestra toda la cantidad indicada, si yo ingreso 10 muestra 10 en el orden que yo quiero, el problema es que ...

  #31 (permalink)  
Antiguo 29/05/2012, 08:29
Avatar de JeMaGa  
Fecha de Ingreso: julio-2011
Ubicación: Bogota
Mensajes: 430
Antigüedad: 12 años, 9 meses
Puntos: 4
Respuesta: Como imprimo desde un for

Hola en el Formulario muestra toda la cantidad indicada, si yo ingreso 10 muestra 10 en el orden que yo quiero, el problema es que al momento de imprimirlo con windows.prin(), solo me muestra hasta 8 no me muestra el resto pero solo en explorer por que en mozilla si funciona, agradezco la ayuda.

Código PHP:
Ver original
  1. <DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2.  
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
  4.  
  5. <!-- Se llama el archivo  jquery.min.js -->
  6. <script type="text/javascript" src="js/jquery.min.js"></script>
  7.  
  8. <head>
  9.  
  10. <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
  11.  
  12. <title>ETIQUETA DE CUARENTENA</title>
  13.  
  14. <!-- Se llama el archivo  js/Ajax.js este archivo contiene las funciones de validaciones. -->
  15. <script language="JavaScript" type="text/javascript" src="Ajax.js"></script>
  16.  
  17. <!-- Se llama el archivo  js/Ajax.js este archivo contiene las funciones de validaciones -->
  18. <script language="JavaScript" type="text/javascript" src="js/funciones.js"></script>
  19.  
  20. <style media="print" type="text/css">
  21. #imprimir {
  22. visibility:hidden
  23. }
  24. #cambiar{
  25. visibility:hidden
  26. }
  27. </style>
  28.  
  29. <script>
  30. /*Imprime el formulario Previa.php y luego lo cierra*/
  31. function imprSelec()
  32. {
  33. window.print();
  34. window.close('Previa.php');
  35. window.open('Cuarentena.php');
  36. }
  37. </script>
  38.  
  39. </head>
  40.  
  41.       <script language="JavaScript" src="js/jquery-1.5.1.min.js"></script>
  42.  
  43.       <script language="JavaScript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
  44.  
  45.       <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet"/>
  46.  
  47.       <body>
  48.  
  49.       <?php
  50.  
  51.          for ($i=1; $i<=$Total ; $i++){
  52.  
  53. if($i % 2 == 0) {
  54.  
  55. echo '<div style="float:right;width: 48%;margin-left: 20px;height:300px">';
  56.  
  57. } else {
  58.  
  59. echo '<div style="clear:both;float:left;width: 48%;margin-left: 5px;height:300px">';
  60.  
  61. }
  62.  
  63. ?>
  64.  
  65. <form id="form1" name="form1" method="POST" action="modificar.php?Lotes=<?php echo $Lote; ?>">
  66.  
  67.   <table width="100%" >
  68.         <tr>
  69.           <th height="47" scope="col"><center><H2><font face="Arial, Helvetica, sans-serif">
  70.               <img src="Cuarentena.png" />&nbsp;&nbsp;&nbsp;&nbsp;CUARENTENA</font></H2></center>
  71.           </th>
  72.         </tr>
  73.   </table>
  74.  
  75.   <table width="100%">
  76.       <tr>
  77.         <th colspan="2">Material: <input name="Producto" type="text" size="35" value="<?php echo $Producto ?>  "/></th>
  78.       </tr>
  79.  
  80.       <tr>
  81.         <th colspan="2">Lote: <input name="Nolote" type="text" size="6" value="<?php echo $Lote ?>"/>   Proveedor: <input name="proveedor" type="text" size="15" value="<?php echo $Proveedor ?>"/></th>
  82.       </tr>
  83.  
  84.       <tr>
  85.         <th colspan="2">Cliente: <input name="Cliente" type="text" size="37" value="<?php echo $Cliente ?> "/></th>
  86.       </tr>
  87.  
  88.       <tr>
  89.         <th colspan="2">No.Recip: <input name="Recipiente" type="text" size="1"  value="  <?php echo $i ?>"/> de <input name="de" type="text" size="1" value="  <?php echo $Total ?>"/> /Und.Emp: <input name="empaque" type="text" size="5" value=" <?php echo $Empaque ?>"/></th>
  90.       </tr>
  91.  
  92.       <tr>
  93.         <th colspan="2">Vencimiento: <input size="4" id="fc_1333032142" type="text" READONLY name="fecha" title="YYMMDD" onClick="displayCalendar(this);" value="<?php echo $Fecha ?>"> Cant.Total:  <input name="total" type="text" size="7" value="<?php echo $De ?>"/></th>
  94.       </tr>
  95.  
  96.       <tr>
  97.         <th colspan="2">Responsable: <input name="responsable" type="text" size="13" value="<?php echo $Responsable ?>"/> Fecha: <input name="fecha1" id="fc_1331842667" type="text" READONLY  title="YYMMDD" onClick="displayCalendar(this);" size="4" value="<?php echo $Fecha1 ?>"/></th>
  98.       </tr>
  99.  
  100.       <tr>
  101.         <th height="26" colspan="2">Observaciones: <input name="observaciones" type="text" size="28" value="   <?php echo $Observaciones ?>"/></th>
  102.       </tr>
  103.   </table>
  104.  
  105. </form>
  106.  
  107. </div>    
  108.  
  109. <form id="form1" name="form1" method="POST" action="modificar.php?Lotes=<?php echo $Lote; ?>">
  110.  
  111.           <?php
  112.  
  113.          }
  114.  
  115.          ?>
  116.  
  117. <div id="noprint">
  118.  
  119. <input type="button" name="imprimir" id="imprimir" value="IMPRIMIR"  onClick="javascript:imprSelec();" />  <a href="modificar.php?Lotes=<?php echo $Lote; ?>" id="cambiar" name="cambiar">.:::Cambiar Datos:::.</a>
  120.  
  121. </div>
  122.  
  123. </form>
  124.  
  125. </body>
  126.  
  127. </html>

Última edición por JeMaGa; 29/05/2012 a las 12:14

Etiquetas: formulario
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 06:53.