Let's say that I am following https://checkup.atlassian.com/server/jira/platform/tutorial-how-to-create-an-ajax-dialog-4227197/ and I want to add a select list to the dialog that we've created with AJS.FormPopup.
Easy, no problem, modify the .vm file and you're set.
What if you want to bind a function to the select list's change event?
How do you get this dialog to import JavaScript?
$webResourceManager.requireResource(), which works in other contexts, doesn't work here. CSS and JS files just don't get loaded.
Adding code to the javascript file you create in this tutorial doesn't work either, unless I'm doing something incredibly wrong by adding
$('#selector').change(function() {
//do stuff
});
How can I do this?