allworknoplay Posted February 20, 2009 Share Posted February 20, 2009 Hey guys, I've always wanted to know how to do this. It's a mixture of PHP and either AJAX or javascript, I'm hoping someone could help me with this. Basically I have 2 drop down boxes. I don't believe this is a "parent/child" relationship. Both dropdown boxes select names from the same table say: PEOPLE If PEOPLE has: John, Jane, and David. If I select the FIRST drop down box and choose John. Then the second drop down box right below it, will only allow me to select Jane or David. So basically, whatever I choose from the first drop down, shouldn't be available in the second drop down... Could someone help me with this one? Quote Link to comment https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/ Share on other sites More sharing options...
allworknoplay Posted February 20, 2009 Author Share Posted February 20, 2009 After giving this more thought, it appears this is really a client side scripting issue. The PHP is only used to generate the list. But I would need some type of javascript code that would control both drop down menu's and not allow the second drop down to contain the selected item from the 1st drop down.... Quote Link to comment https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/#findComment-767263 Share on other sites More sharing options...
premiso Posted February 20, 2009 Share Posted February 20, 2009 Look into jQuery, they have examples online and it is great framework for AJAX and other Javascript needs. Quote Link to comment https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/#findComment-767271 Share on other sites More sharing options...
allworknoplay Posted February 20, 2009 Author Share Posted February 20, 2009 Look into jQuery, they have examples online and it is great framework for AJAX and other Javascript needs. Will do!!! Quote Link to comment https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/#findComment-767279 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.