Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/01/2009, 13:56
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 7 meses
Puntos: 2
Respuesta: saltar de campo formulario con enter

Muy buenas David,
revisando el enlace lo adapte y esto kdó pero no me funciona:
Código php:
Ver original
  1. <!-- <script type="text/javascript">
  2. function tabular(e,obj)
  3. {
  4.     tecla=(document.all) ? e.keyCode : e.which;
  5.     if(tecla!=13) return;
  6.     frm=obj.form;
  7.     for(i=0;i<frm.elements.length;i++)
  8.     if(frm.elements[i]==obj)
  9.     {
  10.         if(i==frm.elements.length-1) i=-1;
  11.         break
  12.     }
  13.     frm.elements[i+1].focus();
  14.     return false;
  15. }
  16. </script>
  17. <body>
  18. <form name="a<?php echo $v['identificador'] ?>" method="post" action="#" id="a<?php echo $v['identificador'] ?>">
  19. <?php
  20. foreach($carro as $k => $v)  
  21. {
  22. ?>
  23. <tr>
  24.     <td align="center"><?php echo $v['id'] ?></td>
  25.     <td><?php echo $v['producto'] ?></td>
  26.     <td align="center"><input type="text" name="cantidad[]" size="4" onKeypress="return acceptNumNumero(this) && tabular(event,this);"></td>  
  27. </tr>
  28. <?php
  29. }
  30. ?>
  31. </form>
  32. -->

Como que en algo estoy equivocado...