Using Jquery to Autorefresh Div Issue - 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: Using Jquery to Autorefresh Div Issue (/showthread.php?tid=53802) |
Using Jquery to Autorefresh Div Issue - El Forum - 08-09-2012 [eluser]doctoroakin[/eluser] Im fooling around with building a CI app and I love the framework. I am trying to refresh a div in my view every 10 seconds and my code is not working. Does anyone have experience with this? My Controller Code: <?php My View code Code: var auto_refresh = setInterval( Any help would be greatly appreciated Using Jquery to Autorefresh Div Issue - El Forum - 08-09-2012 [eluser]CroNiX[/eluser] by default CI uses POST, not GET, so try using jQuery's $.post() instead of $.get(). Using Jquery to Autorefresh Div Issue - El Forum - 08-09-2012 [eluser]CroNiX[/eluser] As a side, there's really no need to load your result into a variable (which takes memory to store) when all you are going to do is echo it out and not use it anywhere else. Just echo the result and avoid using the variable. You're not sending the data to a view. Code: $this->load->model('points'); Using Jquery to Autorefresh Div Issue - El Forum - 08-31-2012 [eluser]doctoroakin[/eluser] Sorry for the late reply - I will test his and report back. Thank's for the suggestions! Using Jquery to Autorefresh Div Issue - El Forum - 08-31-2012 [eluser]doctoroakin[/eluser] Thanks for the reply and suggestions. I will test this and report back. Using Jquery to Autorefresh Div Issue - El Forum - 10-16-2012 [eluser]Razvan V[/eluser] Hi, did it work? |