-
how do i..
: Hi
I am developing a web site using asp and this is regarding a problem i am
facing during this development.
the problem is as follows
i have created a database table having two columns
Skill column
and subskill column
there are many subskills corressponding to a skill.
now i want to create two drop down lists.
one dropdown list will have all distinct values of skill column
now i want that whenever i select a skill from the skill dropdown list ,
the other dropdown list fills with corresponding sub-skill.
i would be highly obliged if you solve my this problem as quickly as
possible.
if possible do send me asp code for the same as well.
thanks
manish jaiswal
u.n m_jaiswal1@yahoo.com
-
Re: how do i..
"manish jaiswal" <m_jaiswal1@yahoo.com> wrote in message
news:3e7757f0$1@tnews.web.devx.com...
>
> one dropdown list will have all distinct values of skill column
> now i want that whenever i select a skill from the skill dropdown list ,
> the other dropdown list fills with corresponding sub-skill.
Well, there are two ways to do this. The first is in straight ASP. This
will be compatible across all browsers, but will require a page reload each
time a different skill is selected in the first drop down.
Basically, you want to store the skillID as the value in the first drop
down. In the onChange event of that dropdown, reload the page and pass the
selected skillID in the querystring. When the page loads, check to see if a
skillID was passed, and if so, look up the subskills associated with that
skillID and load the second dropdown with those values.
The second option is to use javascript to load the appropriate collection on
the client side. This is faster, and does not require another round-trip to
the server, but will be difficult to make useable across all browser
versions. There are several examples on the net of dynamically loading
select boxes in javascript. Do a quick google search.
HTH!
-Devin Knutson
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks