hello,
I have checked any correct way to catch specified message which is passed to alertmsg box,
but I have no result.
The only way I found (but I don't recommend to do this) is to modify showAlertMsg function (from detail_form.js).
How to perform an edit:
1. copy detail_form.js to site/mods/wwwroot/scripts folder;
2. find next code:
if (alertmsg != null) {
if (e.innerHTML.length > 0 &&
alertmsg.style.display != "block") {
alertmsg.style.display = "block";
adjScrollDivHeight();
}
if (e.innerHTML.length == 0) {
alertmsg.style.display = "none";
adjScrollDivHeight();
}
}
3. modify to:
if (alertmsg != null) {
if (e.innerHTML.length > 0 &&
alertmsg.style.display != "block") {
alertmsg.style.display = "block";
if (alertmsg.innerText.indexOf('%YOUR MESSAGE PART HERE%')>0) {
alertmsg.style.color = "red";
} else {
alertmsg.style.color = "black";
}
adjScrollDivHeight();
}
if (e.innerHTML.length == 0) {
alertmsg.style.display = "none";
adjScrollDivHeight();
}
}
regards
cdtj