I can’t say if this will get you in the right direction or not. I have created a plugin that lets you set location rules by select fields in other field groups. When it came to the JS part of it what I did was to extend the ACF AJAX to add my own and to trigger the updated. You can see this here https://github.com/Hube2/acf-custom-field-locations-rule/blob/master/acf-custom-field-location-rule.js.
Like I said, this extends acf.ajax. What it does is that it gets the value for a field and then triggers ACF to refresh (fetch) the field groups. There shouldn’t be any reason that you couldn’t do this with fields outside of ACF as will.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!