php - Can't Display data from mysql on table jquery mobile -


to point, i'm having trouble jquery mobile. if innactive source jquery script run. if activate source of jquery, php script didnt work.

this script

        <html>              <head>              <title>security</title>              <meta name="viewport" content="width=device-width, initial-scale=1">              <!--script jquery source-->             <link rel="stylesheet" href="jqm2/jquery.mobile-1.3.1.min.css" />             <script src="jqm2/jquery.js"></script>             <script src="jqm2/jquery.mobile-1.3.1.min.js"></script>              <!--script jquery source-->              </head>          <body>          <div data-role="page" id="bahanbaku" class="type-interior" data-theme="c">          <div data-role="header">             <h1>bahan baku</h1>         </div><!-- /header -->      <div data-role="content">              <form method="post" action="bahanbaku.php">            <!--this select button-->          <select name="barang" data-native-menu="false" onchange="this.form.submit()">             <option value="">pilih nama barang</option>             <option value="a">a</option>             <option value="b">b</option>            </select>             <!--this select button-->          </form>           <?php          //this script data mysql based select button             if(isset($_post[barang])){                  $barang = $_post[barang];                  //print_r($_post);                  $sql2 = "select *  tb_spekbaku namabarang = '$barang' ";                  $hasil2 = mysql_query($sql2) or die ('error = '. mysql_error());                  $data2 = mysql_fetch_array($hasil2);                }             ?>         <table data-role="table" id="table-column-toggle" data-mode="columntoggle" class="ui-responsive table-stroke">          <thead>            <tr>              <th>jenis spec</th>              <th>spec</th>             </tr>          </thead>          <tbody>            <tr>              <th>lain lain</th>              <td><?php echo $data2[lain];?></td><!--this line when jquery inactive result showed, if jquery active result not show again-->             </tr>           </tbody>           </table>              </div><!--end off  content-->         <div data-role="footer">             <h4>bla bla </h4>         </div><!-- /footer -->     </div><!--end of page-->     </body> </html> 

can me fix this? im appreciated answer thanks

by default form submissions being automatically handled ajax in jqm.

to prevent behavior, add data-ajax="false" attribute form element.

<form method="post" action="bahanbaku.php" data-ajax="false"> 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -