![]() |
Dynamic Dependent Select Box 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: Dynamic Dependent Select Box AJAX (/showthread.php?tid=57665) |
Dynamic Dependent Select Box AJAX - El Forum - 04-01-2013 [eluser]Thiago Leao[/eluser] Hi guys, I'm trying to dynamically popular. Select category and subcategory appears registered Produto (Controller) Code: public function ajax_call() { Produto_model (MODEL) Code: function get_categoria() { VIEW Code: $(document).ready(function(){ Could someone help me? thanks! Dynamic Dependent Select Box AJAX - El Forum - 04-01-2013 [eluser]TheFuzzy0ne[/eluser] Your script sends the HTML for an entire <select>. So your dropdown ends up like this: Code: <select name="city" class="city"> You either need to just send the HTML for the <option> tags, or you need to completely replace your dropdown in your view. |