Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Repopulating a List Box

    Hi Guys,
    This is just a theory question at the moment unless any knows how to do it in PHP.

    Example: You have a form to fill in and you need to control the input from the user to get the same results entered from everyone.

    If you populate a list box from the "county" field in an address db you will end up with a list over 50 entries long!

    If is possible to refresh the list based on the input entered by the user. The user inputs 'S' and the list then repopulates to only the entries starting 'S', the user them types 'o' and the list then repopulates with only the entries starting 'So', and so on until only one or two options remain in the list box

    The other trick will be to keep any data the user has already input into the form, name etc while they are "drilling down" through the 'county' list box.

    I've seen it done in applications but can it be done in PHP.

    Looking forward to seeing if there is an answer

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'm not shure i understand exactly what you mean by the 50 entires long but from what i've understood, if you want to change it on the fly you'll be needing Javascript. if you use JS don't forget to check the data when the form gets submitted(never know who might have a quirky browser or bad intention when submitting a form) even if you want to reload the page with new data when somone tpyes in one key thnen you'll need javascript. without JS this scenario might become quite user un-friendly.
    photoshop too expensive? use the GIMP! www.gimp.org


  •  

    Posting Permissions

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