Hello,
in that post I meant you cannot emulate the "JS event functions" parameter using the custom function; I think your question is different but probably the answer is the same, at least for "onchange": theoretically there isn't any incompatibility between calculated fields and custom js functions but the onchange javascript event is NOT triggered by a change made by the calculated field function, that's why your JS function doesn't work.
Best,