Foros del Web » Creando para Internet » HTML »

Formulario que no envia datos

Estas en el tema de Formulario que no envia datos en el foro de HTML en Foros del Web. @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); Código HTML: Ver original < form id = "msform" action = "aca.php" method = "post" >     <!-- progressbar -->     ...
  #1 (permalink)  
Antiguo 09/03/2015, 03:42
 
Fecha de Ingreso: febrero-2014
Mensajes: 32
Antigüedad: 10 años, 2 meses
Puntos: 0
Formulario que no envia datos

Código HTML:
Ver original
  1. <form id="msform" action="aca.php" method="post">
  2.     <!-- progressbar -->
  3.     <ul id="progressbar">
  4.         <li class="active">Ingrese su usuario de *</li>
  5.         <li>Ingrese la URL de la *</li>
  6.         <li>Ingrese * y *</li>
  7.     </ul>
  8.     <!-- fieldsets -->
  9.     <fieldset>
  10.         <em style="background:#80BFFF; <? echo " $msg "; ?>">El servicio esta inhabilitado para su uso, su saldo actual es de 0.</em>
  11.         <p>Nombre de usuario en *</p>
  12.         <input name="*" type="text" class="active" onfocus="this.value=''" value="*/Tu_usuario" id="*">
  13.         <input type="button" name="next" class="next action-button" value="Siguiente" />
  14.     </fieldset>
  15.     <fieldset>
  16.         <input name="*" type="text" class="active" onfocus="this.value=''" value="Url *">
  17.         <p>Credito a gastar</p>
  18.         <input name="ptss" type="text" class="ptss" id="ptss" style="height: 40px; width: 40px;" onFocus="vaciar_campo(this)" value="0">
  19.         <br>
  20.         <input type="button" name="previous" class="previous action-button" value="Anterior" />
  21.         <input type="button" name="next" class="next action-button" value="Siguiente" />
  22.     </fieldset>
  23.     <fieldset>
  24.  
  25.         <table style="margin: 0 auto;">
  26.             <tr>
  27.                 <td>
  28.                     <p>Tiempo en que recibiras *</p>
  29.                 </td>
  30.             </tr>
  31.             <tr>
  32.                 <td>
  33.                     <label for="time"></label>
  34.                     <select name="time" id="time">
  35.                         <option>1 Hora</option>
  36.                         <option>3 Horas</option>
  37.                         <option>5 Horas</option>
  38.                         <option>10 Horas</option>
  39.                         <option>15 Horas</option>
  40.                         <option>24 Horas</option>
  41.                     </select>
  42.                 </td>
  43.                 </td>
  44.             </tr>
  45.             <tr>
  46.                 <td>
  47.                     <p>Proveniencia de * </p>
  48.                 </td>
  49.             </tr>
  50.             <tr>
  51.                 <td>
  52.                     <label for="prov"></label>
  53.                     <select name="prov" id="prov">
  54.                         <option>America del Sur</option>
  55.                         <option>America del Norte</option>
  56.                         <option>Europa</option>
  57.                     </select>
  58.                 </td>
  59.             </tr>
  60.         </table>
  61.         <input type="button" name="previous" class="previous action-button" value="Anterior" />
  62.         <input type="submit" name="submit" class="submit action-button" value="Enviar" />
  63.     </fieldset>
  64. </form>


Por alguna razon al presionar el boton "Enviar", no sucede nada. Alguna hipotesis?

Última edición por pzin; 09/03/2015 a las 03:57 Razón: Arreglar highlight
  #2 (permalink)  
Antiguo 09/03/2015, 03:43
 
Fecha de Ingreso: febrero-2014
Mensajes: 32
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: Formulario que no envia datos

Tambien hay un JS que opera en el Formulario.

Código Javascript:
Ver original
  1. /*
  2. Orginal Page: http://thecodeplayer.com/walkthrough/jquery-multi-step-form-with-progress-bar
  3.  
  4. */
  5. //jQuery time
  6. var current_fs, next_fs, previous_fs; //fieldsets
  7. var left, opacity, scale; //fieldset properties which we will animate
  8. var animating; //flag to prevent quick multi-click glitches
  9.  
  10. $(".next").click(function(){
  11.     if(animating) return false;
  12.     animating = true;
  13.    
  14.     current_fs = $(this).parent();
  15.     next_fs = $(this).parent().next();
  16.    
  17.     //activate next step on progressbar using the index of next_fs
  18.     $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
  19.    
  20.     //show the next fieldset
  21.     next_fs.show();
  22.     //hide the current fieldset with style
  23.     current_fs.animate({opacity: 0}, {
  24.         step: function(now, mx) {
  25.             //as the opacity of current_fs reduces to 0 - stored in "now"
  26.             //1. scale current_fs down to 80%
  27.             scale = 1 - (1 - now) * 0.2;
  28.             //2. bring next_fs from the right(50%)
  29.             left = (now * 50)+"%";
  30.             //3. increase opacity of next_fs to 1 as it moves in
  31.             opacity = 1 - now;
  32.             current_fs.css({'transform': 'scale('+scale+')'});
  33.             next_fs.css({'left': left, 'opacity': opacity});
  34.         },
  35.         duration: 800,
  36.         complete: function(){
  37.             current_fs.hide();
  38.             animating = false;
  39.         },
  40.         //this comes from the custom easing plugin
  41.         easing: 'easeInOutBack'
  42.     });
  43. });
  44.  
  45. $(".previous").click(function(){
  46.     if(animating) return false;
  47.     animating = true;
  48.    
  49.     current_fs = $(this).parent();
  50.     previous_fs = $(this).parent().prev();
  51.    
  52.     //de-activate current step on progressbar
  53.     $("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
  54.    
  55.     //show the previous fieldset
  56.     previous_fs.show();
  57.     //hide the current fieldset with style
  58.     current_fs.animate({opacity: 0}, {
  59.         step: function(now, mx) {
  60.             //as the opacity of current_fs reduces to 0 - stored in "now"
  61.             //1. scale previous_fs from 80% to 100%
  62.             scale = 0.8 + (1 - now) * 0.2;
  63.             //2. take current_fs to the right(50%) - from 0%
  64.             left = ((1-now) * 50)+"%";
  65.             //3. increase opacity of previous_fs to 1 as it moves in
  66.             opacity = 1 - now;
  67.             current_fs.css({'left': left});
  68.             previous_fs.css({'transform': 'scale('+scale+')', 'opacity': opacity});
  69.         },
  70.         duration: 800,
  71.         complete: function(){
  72.             current_fs.hide();
  73.             animating = false;
  74.         },
  75.         //this comes from the custom easing plugin
  76.         easing: 'easeInOutBack'
  77.     });
  78. });
  79.  
  80. $(".submit").click(function(){
  81.     return false;
  82. })
  #3 (permalink)  
Antiguo 09/03/2015, 04:27
Avatar de lauser
Moderator Unix/Linux
 
Fecha de Ingreso: julio-2013
Ubicación: Odessa (Ukrania)
Mensajes: 3.278
Antigüedad: 10 años, 8 meses
Puntos: 401
Respuesta: Formulario que no envia datos

Pon el code del action, a ver.
__________________
Los usuarios que te responden, lo hacen altruistamente y sin ánimo de lucro con el único fin de ayudarte. Se paciente y agradecido.
-SOLOLINUX-
  #4 (permalink)  
Antiguo 09/03/2015, 08:50
 
Fecha de Ingreso: febrero-2014
Mensajes: 32
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: Formulario que no envia datos

El ACTION es diferente al que muestra en el codigo que puse, pero en sintesis es lo mismo, al presionar "Enviar" no pasa nada.

Código HTML:
Ver original
  1. <form action="<?=$_SERVER['PHP_SELF']?>" method="POST" name="form" id="msform">

Esto hace que cargue el php que se encuntre en el mismo documento. El codigo php, esta cortado porqué no lo puedo publicar todo.

Código PHP:
Ver original
  1. <?php
  2.  
  3. if (isset($_POST['submit'])) {
  4.    
  5. Acá abría consultas mysql
  6.  
  7.     }
  8. ?>

De igual forma estoy seguro que es el formulario. Al presionar el boton SUBMIT, es como si no lo fuese.
  #5 (permalink)  
Antiguo 09/03/2015, 12:13
 
Fecha de Ingreso: noviembre-2011
Ubicación: Guatemala
Mensajes: 16
Antigüedad: 12 años, 5 meses
Puntos: 0
Respuesta: Formulario que no envia datos

Probe tu formuladio y si funciono perfectamente.

Cuando lo presionas el submit no pasa nada? Manda algun error?

Saludos.

Etiquetas: envia, formulario, php
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 14:49.