WordPress auto load custom posts

I am making a widget for wordpress that loads custom posts based on taxonomy.

The procedure is simple

Read More
  1. check that specific custom post exists. >> working
  2. If exist then load related taxonomies as select box option >> working
  3. After selecting a taxonomy form the list it auto checks if there is any post related to it. If there is then the program auto loads the related posts as another select box option by setting the taxonomy name as post args. >> not working
  4. Select a post from the last select box and save to display it.

I am facing problem with the 3rd step. What built in function should I use to do that? Is there any function that can check a select box value like isset ?
Should I use AJAX to check posts based on taxonomy value?
Thank you.

Related posts