Ver Mensaje Individual
  #6 (permalink)  
Antiguo 13/01/2009, 11:15
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 15 años, 10 meses
Puntos: 2
Respuesta: Saltar Cajas de Textos con Enter

Hola esto es lo que me acosejaste:
js
Código php:
Ver original
  1. <!-- function tabular(e,obj)
  2. {
  3.     tecla=(document.all) ? e.keyCode : e.which;
  4.     if(tecla!=13) return;
  5.     frm=obj.form;
  6.     for(i=0;i<frm.elements.length;i++)
  7.     if(frm.elements[i]==obj)
  8.     {
  9.         if(i==frm.elements.length-1)
  10.             i=-1;
  11.         break
  12.     }
  13.     if(frm.elements[i+1].disabled==true)
  14.         tabular(e,frm.elements[i+1]);
  15.     else
  16.         frm.elements[i+1].focus();
  17.     return false;
  18. } -->

pero no me funciona para mi caso debido a que esta este FOREACH: (ojo cambie en name e id del formulario por form)
Código php:
Ver original
  1. <!-- <form name="form" method="post" action="#" id="form">
  2. <?php
  3. foreach($carro as $k => $v)              /////////FOREACH
  4. {
  5. ?>
  6. <tr>
  7.     <td align="center"><?php echo $v['id'] ?></td>
  8.     <td><?php echo $v['producto'] ?></td>
  9.     <td align="center"><input type="text" name="cantidad[]" size="4"></td>    //AQUI EL NAME ES cantidad[]
  10. </tr>
  11. <?php
  12. }
  13. ?>
  14. </form> -->

Necesito por favor sus ayudas