Hi
Another small problem
I can't get any message(alert or message) when i insert a record into my database
This is my function
function atividadeNova(){
$('#fm').form('submit',{
url: 'nova_atividade.php',
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
var result = eval('('+result+')');
if (result.errorMsg){
$.messager.show({
title: 'Erro',
msg: result.errorMsg
});
} else {
$('#dlg').dialog('close'); // close the dialog
$('#dg').datagrid('reload'); // reload the user data
}
}
});
}
And this is my php
echo json_encode(array(
'idativade' => mysql_insert_id(),
'nomecargo' => $nomecargo,
'atividade' => $atividade,
'data' => $data,
'hora' => $hora,
'local' => $local,
'inter' => $inter,
'notas' => $notas,
'success': true,
"message": 'Registo gravado.'
));
}
}
}
else {
echo json_encode(array('errorMsg'=>'Erro no registo.'));
}
?>
I want to have a message telling the result....but even when json is false i don't have any message box
Any help please?