CodeIgniter Forums
Load the data in ajax - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Load the data in ajax (/showthread.php?tid=60267)



Load the data in ajax - El Forum - 02-18-2014

[eluser]htarahi[/eluser]
Hi every One
I want to load 4 tables that each specify with a selection box.
I mean I have below selection box for example.with select each ,Its table load in ajax.
<select>
<option value="table1">table1</option>
<option value="table2">table2</option>
<option value="table3">table3</option>
<option value="table4">table4</option>
</select>
-----------------------------------------------------------
(table load here )





Load the data in ajax - El Forum - 02-19-2014

[eluser]Karman de Lange[/eluser]
You will just need to update the class/id selectors and the url as you did not post any info regarding this.

Code:
$('#select_dropdown').on('change',function(){

   //Get table Name
  $table = $(this).val();
  //Load the url + table into table_holder.
  $.('#table_holder')load('url'+table);

})