Re: Dynamic Select Lists - 1st Selection Effects 2nd! -- SOLVED!!
| From: | Rahul S. Johari | Date: | Thu, 31 Jul 2008 19:22:11 +0000 |
| Subject: | Re: Dynamic Select Lists - 1st Selection Effects 2nd! -- SOLVED!! | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277567@lists.php.net to get a copy of this message | ||
On Jul 31, 2008, at 3:10 PM, Boyd, Todd M. wrote:
Indeed! This problem actually opened up my horizon to the whole AJAX foundation. I think what I was most impressed was the ease with which I was able to accomplish this Dynamic state for my select lists, and how effective the script actually is. I actually had two separate SELECT LIST combinations on the page which both needed the same Dynamic functionality. Achieved it by fine-tuning my script a bit. Really liking AJAX right now and ready to dip in my feet deeper. Thanks Todd, appreciate your support! --- Rahul Sitaram Johari Founder, Internet Architects Group, Inc. [Email] sleepwalker@rahulsjohari.com [Web] http://www.rahulsjohari.com-----Original Message----- From: Rahul S. Johari [mailto:sleepwalker@rahulsjohari.com] Sent: Thursday, July 31, 2008 2:06 PM To: Boyd, Todd M. Cc: php-general@lists.php.net Subject: Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!--SOLVED!! Did IT!!!! Haha ... just as you were probably writing in & sending this mail. I pretty much used your theory and actually did look around under http://www.w3schools.com/ajax/ to get the relevant AJAX information. Works like a charm. Pretty much using an onChange=grabCountiesfromAnotherPHPpage(); function. Code is similar to your example below - slightly different. An included 'ajax.js' takes care of the AJAX code, and an additional 'counties.php' writes counties based on a "SELECT COUNTY from myTable WHERE STATE = $_GET['STATE']" SQL Query in an independent SELECT LIST. AJAX takes care of the rest by pulling in this SELECT LIST on to the original page. Thanks a ton - this actually turned out to be easier then I thought!! :)Rahul, Glad to hear it! Hopefully, this will keep you from abandoning new and exciting programming horizons that you don't immediately feel capable of grasping. After all, if you're going to be an "Internet Architect," AJAX is something you'll need to be (at least comfortably) familiar with. :) Todd Boyd Web Programmer