[eluser]alboyd[/eluser]
I would do it like this:
In View:
Code:
[removed]
var base_url = "<?php echo $base_url; ?>";
[removed]
...
...
<a href="#" id="view_all">Test</a>
Then in the Javascript script section or included file:
Code:
$("a#view_all").click(function() {
var series{};
series['id'] = 1;
var url = base_url + "controller/viewAll";
$("#content").load( url, series, function(){} );
return false;
});
And your controller function can stay the same. try that and let me know...
EDIT: [removed] should be the open and close tags of javascript script
EDITEDIT: obviously $base_url is passed to the view and is basically base_url(); which I guess you could also use in the view rather than the variable...
LASTLY: show me your $config['base_url']