user1202278
user1202278

Reputation: 773

Form processing with JQuery Mobile

Process the data handed to an html page from a form.

This is my form:

  <form  data-theme="b"    method="get"    action="process.html"    enabled>           <fieldset>
 <div   data-role="fieldcontain"> 
 <label for="basic>  Name  </label>
 <input type="text" name="basic" id="basic" value=""   />                                   </div>                                
 <button type="submit" data-theme="b" name="submit"  value="submit-value">  Submit     </button>               
   </fieldset> 
</form>

So when it comes to process.html the values should be in the url, such as process.html?submit=submit. But I can't seem to be able to read them at all.

How should I go about doing the above successfully?

Upvotes: 0

Views: 418

Answers (1)

user1202278
user1202278

Reputation: 773

Fixed it by adding this before </head> . Turns off all the AJAX that gets in the way of such a GET form.

 $(document).ready(function() {
                            $.mobile.ajaxLinksEnabled = false;
                            $.mobile.ajaxEnabled = false;
                            $.mobile.ajaxFormsEnabled =false;
              });

Upvotes: 1

Related Questions