Hi,
I have a grid with action bar and 2 state.
I have ajax code to change statut of record but when i click on action button, I have any response.
DO you have any Idea ?
Ajax code
if (sc_actionbar_clicked_state() == “Non”) {
$update = "UPDATE entity_doa SET entity_doa.enabled = 1 WHERE entity_doa.id = " . {ed.id};
sc_actionbar_state(“Change”, “Oui”);
sc_alert (“Message”, $update);
}
elseif (sc_actionbar_clicked_state() == “Oui”) {
$update = "UPDATE entity_doa SET entity_doa.enabled = 0 WHERE entity_doa.id = " . {ed.id};
sc_actionbar_state(“Change”, “Non”);
sc_alert (“Message”, $update);
}
sc_exec_sql ($update);