title: How to add onChange function to js file generated with .ttinclude files?
body: <p>In settings we have an option to select a location, this now needs to be able to have a secondary dropdown location to set a default sublocation. So the secondary dropdown needs to show the sublocations of the option selected in the first dropdown.</p>
  <p>Looking around I see only answers that tell me to write a function in js, but the issue for that is that the js file is automatically generated with T4 and the .ttinclude files belonging to that.</p>
  <p>I don't really understand this, but it looks like it's not set up to add functions yet, how can I do this?</p>