Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Combo Box to ListBox

Reply
Thread Tools

Combo Box to ListBox

 
 
Scott
Guest
Posts: n/a
 
      11-21-2003
I have an ASP page which show's a Drop-Down Combo box, and
a ListBox. My Combo Box is populated from a SQL Select
Statement which shows User Groups. I want to populate my
Listbox with all the names associated with that User Group
selected from the Combo Box. I have a Select Statement
that does this already also.

However, I need to pass the Selected item chosen in the
Combo Box with my SQL statement so I can get the correct
list of names returned. The ASP page tries to run both
Select statements, but errors when it reaches the second
select statement since the parameter hasn't been filled
yet, because the page hasn't given me a chance to chose an
item from the Combo Box.

Does anyone know how I can accomplish this?

Currently, we are NOT using ASP.Net.

 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      11-21-2003
To do this, you need to either load all of the possible information in the
page and then use client-side script to change the second SELECT, or make it
a two step process where the user makes his first selection, the another
trip is made to the server (by submitting the data, or using client side
code to reload the page, etc.) and the server will then have that info it
needs for the second query.

See here for links to samples. http://www.aspfaq.com/2270

Ray at home

"Scott" <(E-Mail Removed)> wrote in message
news:0b7701c3afca$77775630$(E-Mail Removed)...
> I have an ASP page which show's a Drop-Down Combo box, and
> a ListBox. My Combo Box is populated from a SQL Select
> Statement which shows User Groups. I want to populate my
> Listbox with all the names associated with that User Group
> selected from the Combo Box. I have a Select Statement
> that does this already also.
>
> However, I need to pass the Selected item chosen in the
> Combo Box with my SQL statement so I can get the correct
> list of names returned. The ASP page tries to run both
> Select statements, but errors when it reaches the second
> select statement since the parameter hasn't been filled
> yet, because the page hasn't given me a chance to chose an
> item from the Combo Box.
>
> Does anyone know how I can accomplish this?
>
> Currently, we are NOT using ASP.Net.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reference one combo box from another combo box SM Javascript 2 04-28-2007 04:49 PM
Fill Combo Box based on another Combo Box dthmtlgod ASP General 1 11-16-2005 04:08 PM
COMBO BOX INSTEAD OF DROP DOWN BOX =?Utf-8?B?QW5nZWw=?= ASP .Net 3 06-29-2004 06:38 PM
Populate List Box base on Combo Box Selection Adrian ASP General 1 02-18-2004 09:49 AM
Combo Box and text box Mike Javascript 2 09-24-2003 07:40 PM



Advertisments