how do i..


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: how do i..

  1. #1
    manish jaiswal Guest

    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

  2. #2
    Devin Knutson Guest

    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



  3. #3
    Terry Guest

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center