After checking out all options here, the solution in this thread finally worked for me:
JavaScript Handler when clicking into a field