use site_url() function of codeigniter...
<?php echo site_url('controllername/functionname') ?>
The above example would return something like: http://example.com/index.php/controllername/functionname;
try this
$.ajax(
{
url:<?php echo site_url('controllername/functionname') ?>,
type:"POST",
success:function(data){
$(".content").load(url);
}
}
updated as per @kolby comment
if you have this script in seperate js file thn..
create a global var base_url in head so that u get this variable in every file.
<head>
....//your stuff
<script>var base_url= <?php echo site_url(); ?></script>
</head>
and use this in ajax
url:base_url+'controllername/functionname',
it cannot read the controller/functionsince i bet you gave a worng path.. that is why it cannot read the controller function...try using proper path..