Click to See Complete Forum and Search --> : Refreshing a combo box from a List box without going to server


mozgheib
06-11-2005, 08:32 AM
Hello,

I have an asp page that gets data from database. The page has
a list box that when a value is selected the equivalent records based
on the list box selection should appear in a combobox. It works fine on
page load.

Now I would like to be able to update(refresh) the combobox when I change
my selection in the list box without going back to the database from the recordset.Is it doable.

Please help.

phpnovice
06-11-2005, 08:51 AM
It is doable only via client-side scripting. Thus, you should post this question in the JavaScript forum. In other words... You would have to use your ASP code to build a JavaScript data array and send that to the client where JavaScript could select from those values all on the client side.

However, I would not actually recommend this approach. Not only are you having to send a lot of data to the client side in order to accomplish this task -- thereby slowing down the loading of your page -- but there is also the potential for JavaScript being disabled (therefore, a lot of wasted processing just to achieve a broken page).