Welcome Guest, Not a member yet? Register   Sign In
Problem with JQuery and CI
#1

[eluser]CRHayes[/eluser]
Hey, I am having trouble with getting JQuery to display information obtained from a CI page.

I have really simplified this example trying to get it to work...but here is what I have

test1.php
Code:
<html>
<head>

    
   $(function(){
    $('select').change(function(){
    $.ajax({
       type: "POST",
       url: "http://www.freelanceselling.com/fls/about/chris",
       data: "",
       success: function(html){
           $("#that").text(html);
           }
    });

    return false
    });
    });
    
</head>

<body>
<form name="this">
<select name="cat">
<option value="one"/>One
<option value="two"/>Two
<option value="three"/>Three
</select>

<div id="that">
</div>
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

Here is the CI controller (about.php - and I am using .htaccess)
Code:
&lt;?php
class About extends Controller {

    function About()
    {
        parent::Controller();

    }

    function index()
    {
        $this->output->set_output("HELLO");
    }

function chris()
{
    
        $this->output->set_output("HELLO");
}
}
?&gt;

I really don't know why the #that div won't display the output!


Messages In This Thread
Problem with JQuery and CI - by El Forum - 12-02-2007, 02:14 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 03:10 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 04:36 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 05:37 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 05:57 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 06:01 PM
Problem with JQuery and CI - by El Forum - 12-02-2007, 06:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB