in my event_model.php I’m doing this:
function validate($action){
if ($this->event_name == ""){
$action->invalid();
$action->set_response_attribute("details","Empty text is not allowed");
return false;
}
return true;
}
in my scheduler.php.tpl how can I check for the ‘details’ attribute to invoke a dhtmlx.message(‘failed’) ???
You can use a code like next
dp.attachEvent("onAfterUpdate", function(sid, action, tid, tag){
var message = tag.getAttribute("details");
if (message) dhtmlx.message(message);
});
That’s awesome.
Works like a charm.
Thanks,
David
Notes:
(added other validations too in my view)
dp.init(scheduler);
dp.attachEvent(“onAfterUpdate”, function(sid, action, tid, tag){
var message = tag.getAttribute(“case_num”);
if (message) dhtmlx.message(message);
});