[eluser]Bart v B[/eluser]
Where do you have your javascript defined?
Is it in the header of your view or an external .js?
In that way you have a problem, because you can not parse php in a javascript.
So, there are a few way's to solve this problem:
1. you put your script in your view.
Code:
<html>
<head>
<+script type="text/javascript">
httpObject.open("GET", "<?php echo base_url();?>home/getnews/", true); <+/script>
</head
2. if it's an external .js then you must make an header to parse it to php..
something like this:
javascript.php
Code:
<?php
header("Content-type: text/javascript");
?>
httpObject.open("GET", "<?php echo base_url()?>home/getnews/", true);
and put offcourse this in your view page. Mind the extention. this is nou php