how to get dropdown value from database in javascript