I am new in codeigniter.
I want to display data in codeigniter view div id from ajax on window load.
View.php
<script type='text/javascript' language='javascript'>
$(window).load(function()
{
$.ajax({
type: "POST",
url: "<?php echo base_url(); ?>colleges/index",
success: function(server_response
{
if(server_response == 'success')
{
$("#fillgrid").html(server_response);
}
else{
alert('Not OKay');
}
}
}); //$.ajax ends here
});
</script>