Welcome Guest, Not a member yet? Register   Sign In
scriptaculous Ajax.InPlaceEditor
#1

[eluser]Greg Aker[/eluser]
Yet another question from me. Sorry...

I'm trying to get the scriptaculous in place editor happening.

I can get it to change on the page, and watching firebug, everything seems ok, but I can't get it to actually post to my database...

Can anyone tell me what I'm doing wrong?

JS:

Code:
document.observe ('dom:loaded', function() {
    new Ajax.InPlaceEditor('question', "/index.php/editors/questionEditor");                          
});

The DOM ID of what I'm changing is "question."


here's my controller specified in the js above:

Code:
function questionEditor()
    {
        $question = $_REQUEST['value'];

        $urlSegment = $this->uri->segment(3);
        $this->db->query('UPDATE test SET question = "$question" WHERE ques_num = "$urlSegment"');

        echo $question;
    }


Thanks in advance :-)

-greg


Messages In This Thread
scriptaculous Ajax.InPlaceEditor - by El Forum - 02-04-2008, 11:20 AM
scriptaculous Ajax.InPlaceEditor - by El Forum - 02-04-2008, 02:55 PM
scriptaculous Ajax.InPlaceEditor - by El Forum - 11-02-2008, 03:51 PM
scriptaculous Ajax.InPlaceEditor - by El Forum - 11-03-2008, 06:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB