Current location: Hot Scripts Forums » General Web Coding » JavaScript » change drop down box based on textbox


change drop down box based on textbox

Reply
  #1 (permalink)  
Old 02-22-05, 09:28 PM
talax talax is offline
New Member
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
change drop down box based on textbox

Hi,

I have a situation where someone types in their employee ID, and I would like to then populate a drop down box based on that employee ID. The choices for the dropdown box are in a SQL table, and I would have another SQL table that lists what options from that dropdown box are available for that employee ID. I am using ASP (not asp.net) and either javascript or vbscript.

For example:

The dropdown box has the following choices:
resource1
resource2
resource3
resource4

if someone types in employee ID 1234, I would do a lookup to find out what options employee ID 1234 has, show that they have access to resource2 and resource3, then the dropdown box changes to:
resource2
resource3

or if someone types employee ID 2345, then the dropdown box changes to:
resource1
resource4


Is this possible?
Reply With Quote
  #2 (permalink)  
Old 02-24-05, 07:38 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
The easiest way to do this is to reload the asp page and simply let asp populate the list. Handeling the response from SQL is a bit trickier, I have not done this myself since I don't code asp but I have heard of those that have. How are you sending the data from the SQL query back to the browser?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to change image with selection of an option from a drop down developer_x JavaScript 5 02-14-05 01:15 PM
Drop down list change PHP ancdy PHP 5 02-10-05 05:33 AM
textbox to text box value Omega2 JavaScript 1 05-28-04 02:02 PM
Declared Functions skipper23 PHP 4 12-17-03 10:06 AM
index page not showing up skipper23 PHP 3 12-15-03 01:10 PM


All times are GMT -5. The time now is 10:42 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.