(maint) Fix how onclick function works

Prior to this commit, the way I discovered what position a version or
endpoint is within dropdown doms was a bit funnky. This commit fixes
that by added a couple new functions for endpoint and version, which
grabs all of the options from each DOM, and returns the index found
based on what was passed in.