I'm trying to make some changes to the way jEditable handles errors. I have a PHP function which is returning:
echo "{'error':'ok', 'error_msg':'There was a problem'}";
in my javascript:
"callback": function( sValue, y )
{
if (sValue == "ok")
{
alert ("ok");
}
else
{
alert ("error");
}},
Now I keep getting the "error" alert on my screen - no matter what I try. Obviously the problem is at this line:
if (sValue == "ok")
but I'm not sure what it is supposed to be? I've looked at other examples on StackOverflow - but couldnt get one that answered my question.