ASP
Loading javascript array from a MS SQL query
8 views
Hello...
I want to be able to have two dropdown menus on my ASP page which are generated from a MS SQL query. I would like to populate the first dropdown menu with the category headers from my query. The second dropdown would then show only those items with the category that was loaded.
For instance, I have a table called reasons in my MS SQL Server. It has the following three fields, reasonID, reasonCategory, and reason.
There are 3 possible categories, each with different amounts of reasons associated with them. I'm assuming I'll need to load three seperate arrays, based on each category when the page is loaded and then only show the correct one when the category is chosen.
My main question here is how do I get the results from my SQL query loaded into a javascript array? Or is there an easier way to accomplish this?
Thanks in advance for any help you all may offer!
Jill