SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru phantom007's Avatar
    Join Date
    May 2008
    Posts
    736
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question Auto Load Listbox

    Hi

    I have 2 listboxes.

    Listbox1 - contains a list of cities. When I choose a city from Listbox1, then based on the selected citiy, Listbox2 will auto populate with the employees of that city.

    Can u plz show me a small example of the same OR a site where I can find similar example.


    Thanx

  2. #2
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before I explain you the solution, it'd be helpful if you could let me know how familiar are you with JavaScript and Ajax?

  3. #3
    SitePoint Guru phantom007's Avatar
    Join Date
    May 2008
    Posts
    736
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    Thats the other thing I wanted to ask. Is it possible NOT to do it with ajax but with a simple JS function?

    Thanx

  4. #4
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's certainly possible to do it without AJAX. You have to download the entire list of city and employees and load it into JavaScript. If the volume of data is too high, this may not be a good choice.

    http://javascript.internet.com/forms...ect-boxes.html

  5. #5
    SitePoint Addict Bravogolf's Avatar
    Join Date
    Aug 2004
    Location
    All over really :)
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's possible with JS. Here's an example of how to accomplish that.

    lol, Kailash Badu beat me to it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •