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 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2010
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Selecting an entry in a listbox

    I have two listbox's that are dynamically populated from a mysql database. Once a user picks an entry from the first the screen updates asynchronously with items in another listbox that relate to the entry that the user picked. My problem is that on the update although the second listbox is populated the 1st resets. I need to set the 1st listbox as the entry that the user picked, but im not sure how to go about this. Has anyone seen any tutorials that they could point me to, im still relatively new with PHP.

  • #2
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    whats a listbox? do you mean a select?

    also can you post your code?

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    if thats what your looking for, you would be better off with a jquery & ajax solution:


    http://plugins.jquery.com/project/selectchain

  • #5
    New Coder
    Join Date
    Jan 2010
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Sorry about the listbox reference, Ive come from the evilness of the ASP camp and forgot myself for a moment!!

    But abduraooft, thats exactly what i was after, i havent had a chance to work it through yet but ill give it a read through and let you know if it works. If not maybe jQuery will be the way to go.. if i can just get my head around it..


  •  

    Posting Permissions

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