I've searched for this but always come up with results on how to create multiple select boxes which are related to the prior selection. That is NOT what I am looking for.
Example: When you create a ModX Resource, you have the template selectbox. When you click on the dropdown, it is dynamically populated using ajax (I assume). I have a project I am working on and instead of the overhead of loading all the data at first, I would like to do what ModX does and only provide the options for the selectbox when the user clicks on the field.
I've somewhat looked at the source for ModX but wasn't really able to figure it out.
Is there a tutorial somewhere on how to create dynamic dropdown boxes similar to ModX backend (like the template selection box)?