Welcome Guest, Not a member yet? Register   Sign In
Ajax load
#2

[eluser]Unknown[/eluser]
Hi

I solve this by including the following in the 1st page, this will call your controller/method and display whatever is returned in the target div.

$('#buttonid').on('click', function(event)
{

$.ajax(
{
type: "POST",
url: "<?php echo base_url();?>index.php/controller/method",
data: {variable:value1,variable2:value2},
success: function(data, status)
{

$('#targetdiv').html(data);



}
}
);
}
);


Messages In This Thread
Ajax load - by El Forum - 02-21-2014, 09:45 PM
Ajax load - by El Forum - 02-27-2014, 06:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB