Welcome Guest, Not a member yet? Register   Sign In
JQuery and Ajax Issue
#1

[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>
                &lt;!-- end header --&gt;                     &lt;!-- Menu --&gt;
                <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>
                &lt;!-- End Menu --&gt;


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


Messages In This Thread
JQuery and Ajax Issue - by El Forum - 12-07-2009, 06:51 AM
JQuery and Ajax Issue - by El Forum - 12-07-2009, 07:15 AM
JQuery and Ajax Issue - by El Forum - 12-07-2009, 12:30 PM
JQuery and Ajax Issue - by El Forum - 12-07-2009, 06:10 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 08:05 AM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 06:10 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 06:41 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 06:47 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 06:57 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 07:02 PM
JQuery and Ajax Issue - by El Forum - 12-08-2009, 07:05 PM
JQuery and Ajax Issue - by El Forum - 12-09-2009, 09:33 PM
JQuery and Ajax Issue - by El Forum - 12-09-2009, 09:46 PM
JQuery and Ajax Issue - by El Forum - 12-09-2009, 09:48 PM
JQuery and Ajax Issue - by El Forum - 12-09-2009, 09:53 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 12:10 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 12:19 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 12:23 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 12:40 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 12:49 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:01 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:13 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:14 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:15 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:16 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:17 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:19 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:24 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:25 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:26 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 01:27 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 03:00 AM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 08:15 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 08:22 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 08:36 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 08:51 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 09:18 PM
JQuery and Ajax Issue - by El Forum - 12-10-2009, 09:39 PM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 12:48 AM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 01:05 AM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 01:11 AM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 01:39 AM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 01:41 AM
JQuery and Ajax Issue - by El Forum - 12-11-2009, 01:41 AM
JQuery and Ajax Issue - by El Forum - 12-17-2009, 01:09 PM
JQuery and Ajax Issue - by El Forum - 12-17-2009, 05:57 PM
JQuery and Ajax Issue - by El Forum - 12-17-2009, 10:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB