[eluser]Bendude[/eluser]
I have a strange problem that I am unable to track down. I am using Codeigniter and Jquery to create an ajax search feature.
Everything is working well and the correct data is been returned from my model but when I load the view from the controller it has the header of the page in the response.
I have tried an empty view to load and still the header of the page is included.
My javascript function is like so
Code:
function filter(id)
{
var series = {}; //init array
data['id'] = id;
var url = "/baseurl/controller/methodName";
$('#result').load( url, data, function(){} );
}
Then from within my controller after i have retrieved the results from the model I simply load the view
$this->load->view("results", $data);
Any help or tips to point me in the right direction would be much appreciated.
below is the response:
Code:
</head>
<body>
<div id="container">
<div id="wrapper">
<div id="header">
</div>
<!-- end header --> <!-- Menu -->
<div id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Testimonials</a></li>
<li class="last"><a href="#">Links</a></li>
</ul>
<div id="sub-menu">
<ul>
<li><a href="#">Profile</a></li>
<li class="last"><a href="#">Privacy</a></li>
</ul>
</div>
</div>
<!-- End Menu -->
Test Ajax
as shown above the result is the text i have echoed from my controller function and the extra content shown above it. It is the rest of the page above the div I am trying to update
Kind Regards
Ben