Welcome Guest, Not a member yet? Register   Sign In
loading bar
#3

(02-08-2016, 02:44 AM)Diederik Wrote: Your question is unrealted to Codeigniter. You will need client side Javascript for this. In Jquery you could do it like this:

Code:
$(".button").click(function(e) {

   e.preventDefault();

   $('#result').html('<img src="/ajax-loader.gif" alt="Loading"/>');
   
   $.ajax({
       type: "POST",
       url:  '/yourUrl' ,
       data: { YourDataArray},
       success: function (data) {
           $('#result').html(data);
       },
       error: function (xhr, status) {
           $('#result').html('Error, somethign went wrong');
       }
   });

thanks
Reply


Messages In This Thread
loading bar - by rchiu5hk - 02-08-2016, 01:35 AM
RE: loading bar - by Diederik - 02-08-2016, 02:44 AM
RE: loading bar - by rchiu5hk - 02-08-2016, 02:47 AM
RE: loading bar - by rchiu5hk - 02-08-2016, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB