[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