简体   繁体   中英

Ajax form jQuerymobile not loading content

The send button is sending the info to my mail, but the page doesn't load the content that is on my .php .

 <div data-role="content">
  <form method="post" action="sendcontactomovil.php">
  <fieldset>
  <div data-role="fieldcontain">
   <label for="nombreyapellido">Nombre y Apellido:</label>
   <input type="text" name="nombreyapellidom"><br/>
  </div>
  <div data-role="fieldcontain">
   <label for="mail">Correo electronico:</label>
   <input type="text" name="mailm">
  </div>
        <div data-role="fieldcontain">
   <label for="telefono">Telefono:</label>
   <input type="text" name="telefonom">
  </div>
        <div data-role="fieldcontain">
  <label for="consulta" style="vertical-align:top">Consulta:</label>
  <textarea cols="40" rows="10" name="consultam"></textarea>
  </div>
  </fieldset>
  <button type="submit" value="Enviar">Enviar</button>
  </form>
 </div>

php

if($send) 
 {echo "<h3 style='text-align: center; margin-top: 200px'> Informacion Enviada Existosamente</h3>";} 
 else 
 {print "Encontramos un error al enviar el mail, por favor avisanos en db@chorrillana.cl"; }

Jquery mobile will use ajax to make the request, in order to see the actualization you need to rerender or reload the page.

If you want to reload after a form submit, you can use ajaxFormsEnabled.

Take a look at the documentation here.

http://jquerymobile.com/demos/1.0a2/#docs/api/globalconfig.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM