Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to show the selected data values without refreshing page
    primarykey
    data
    text
    <p>now i showing the data with refreshing the page but i want to show the data without refreshing the page, <code>window.location = '?action=suppliernetwork&amp;supplier_id='+supplier_id+'';</code> is cause for refreshing page anyone guide me how to do this withour refreshing the page.thanks</p> <p><strong>HTML</strong></p> <pre><code>&lt;select name="supplierselect" id="supplierselect" style="margin:0px 0px 0px 0px;background-color:#C2FFC2;width:125px;"&gt; &lt;option&gt;--Select--&lt;/option&gt; &lt;?php $dbHost = 'localhost'; // usually localhost $dbUsername = ''; $dbPassword = ''; $dbDatabase = ''; $db = mysql_connect($dbHost, $dbUsername, $dbPassword) or die ("Unable to connect to Database Server."); mysql_select_db ($dbDatabase, $db) or die ("Could not select database."); $sql=mysql_query("select * from supplier"); while($row=mysql_fetch_array($sql)) { ?&gt; &lt;option id="supplierselect" value="&lt;?php echo $row['supplier_id']; ?&gt;"&gt;&lt;?php echo $row['supplier_id']; ?&gt;&lt;/option&gt; &lt;?php } ?&gt; &lt;/select&gt; </code></pre> <p><strong>ajax:</strong></p> <pre><code>$(function() { // document.ready $("#supplierselect").on("change", function() { //var ID=$(this).attr('id'); var supplier_id=$("#supplierselect").val(); $.ajax({ url: "suppliernetwork/select.php", type: "POST", data: { supplierselect: $(this).val() }, success: function(data) { $("#display").html(data); window.location = '?action=suppliernetwork&amp;supplier_id='+supplier_id+''; $("#flash").hide(); } }); }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload