title: Showing page when submit form via ajax - Jquery mobile
body: <p>I am using JQuery Mobile for creating mobile application and i have index.html in this html page i have 2 pages(search_form, search_result). I want to submit search form from search_form page and then it should shows the search_result page. The following is my js code:</p>
  
  <pre><code>            var formURL = "http://10.0.2.2/jobs/mobile/home/searchJobs/";
  
              $.ajax(
              {
                  url : formURL,
                  type: "POST",
                  data : $("#search_frm").serialize(),
                  //data : "&amp;data=90",
                  beforeSend: function() {
                      showLoader();
                  },
                  success:function(result)
                  {   
                      var list = '';
                      var data = $.parseJSON(result);
                      //$("#ulListview1").html($.parseJSON(result)); 
                      $.each(data,function(i,item){
  
                          if(item.id=='0')
                          {
                              list += "&lt;li&gt;&lt;span style='color:red;'&gt;Record not found!&lt;/span&gt;&lt;/li&gt;";
                          }
                          else
                          {
  
                              list += "&lt;li&gt;&lt;a data-transition='slide' href='#job_details_page' onclick='getJobDetails("+item.id+");'&gt;" + item.job_title +"&lt;p style='display:inline;'&gt; at "+item.company+"&lt;/p&gt;&lt;br&gt;&lt;p&gt;&lt;span&gt;&lt;strong&gt;Expiring On:&lt;/strong&gt; "+item.expire_date+"&lt;/span&gt; &lt;br&gt;&lt;span&gt;&lt;strong&gt;Job Location:&lt;/strong&gt; "+item.location+"&lt;/span&gt;&lt;/p&gt;"+"&lt;/a&gt;&lt;/li&gt;"; 
                          }
                        //alert(data[i]["id"] + " " + data[i]["username"]);  
                      });
                      //hide loader
                      hideLoader();
  
                      $("#search_list").html(list); 
                      $("#search_list").listview("refresh");
                      $("#search_result").css("display","block");
  
                  },
                  error: function(jqXHR,status)
                  {
                      alert(status);
                      //alert($.parseJSON(jqXHR));     
                  }
              });
  </code></pre>
  
  <p>Could you please help to fix this problem?</p>