CodeIgniter Forums

Full Version: Ajax refresh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Patrick Reck[/eluser]
Hello! I'm trying to update a DIV box every minute. I've made a JS function which is getting called every minute as it's supposed to.

Now, how do I get AJAX to update the DIV box using a controller?

El Forum

[eluser]Patrick Reck[/eluser]
This did the trick

[code]
         $.ajax({
           type: "POST",
           url: "<?php echo site_url(); ?>mail/ajaxupdate/5",
           data: dataString,
 
           success: function(data){
$("#mail_container").html(data);
           }
 
         });