Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,446 members, 7,958,334 topics. Date: Wednesday, 25 September 2024 at 12:37 PM |
Nairaland Forum / Science/Technology / Programming / Populate 3 Drop Down Menu Using 3 Different Tables (1043 Views)
Create A Dropdown Menu Using Reactjs / Simple Drop Down Menu With Jquery And CSS / Facebook Style Drop Down Menu Design Using CSS (2) (3) (4)
Populate 3 Drop Down Menu Using 3 Different Tables by uvalued(m): 12:14am On Jul 30, 2016 |
Greetings. I am designing a simple page which should have three drop down menu which should be populated from the database after each selection of option... I searched and found the following https://www.nairaland.com/2852008/everyday-php-programming-challenge-solved#41811565 https://www.nairaland.com/2837905/javascript-jquery-html-5-css#41766960 https://www.nairaland.com/975932/need-php-code#11247872 but the solution was targeted at either one or two drop down menu.... below is the code u have put together (am using deprecated mysql but will convert it to pdo after i grasp it). <html> 1. -----Drop down menu Contains rank of staff which is first clicked <table id='staff'> figure 2. -----Drop down menu Contains levels which is populated SUCCESSFULLY after figure 1 (rank of staff is clicked) <tr style=""> Figure 3. -----Drop down menu should be populated with course codes after level is selected <tr style=""> Using the following AJAX codes, works well to populate level drop down menu after staff drop down is selected
RESULT: After selecting Staff rank in figure 1, It display the following level correctly from table level in levels Drop down menu 100 LEVEL Which is okay. My problem is that i modified the AJAX and Php codes above so that i can populate the course code drop down menu after selecting the level drop down menu like so After selecting 100 level in figure 2 , wants course codes, in tablecom111 com112 com113 etc--> nothing shows like the image below. Thanks for your suggestion
|
Re: Populate 3 Drop Down Menu Using 3 Different Tables by uvalued(m): 6:45am On Jul 30, 2016 |
hello still expecting your support |
Re: Populate 3 Drop Down Menu Using 3 Different Tables by Codenister: 8:03am On Jul 30, 2016 |
Turn on the developer tools in your browser (by pressing CTR + shift + I) and see what happens when you click the level item. Probably there's an error in your php code |
Re: Populate 3 Drop Down Menu Using 3 Different Tables by bb6xt(m): 8:12am On Jul 30, 2016 |
@OP JQuery is your friend! Don't fight it, embrace it. |
Re: Populate 3 Drop Down Menu Using 3 Different Tables by guru01(m): 10:08am On Jul 30, 2016 |
Your error might be from your php code which is not available. Use a JavaScript debugger which might be your console, then console.log the response coming from server. |
Re: Populate 3 Drop Down Menu Using 3 Different Tables by uvalued(m): 6:05am On Jul 31, 2016 |
thanks guys your suggestion was verry helpful |
Re: Populate 3 Drop Down Menu Using 3 Different Tables by guru01(m): 6:54am On Jul 31, 2016 |
uvalued:Am glad it helped you. |
(1) (Reply)
Is It That MTN Developers Don't Understand Relational Operators? / How To Make From $200-$2000 Building Mobile App With Zero Code..drag And Drop / How To Transfer Music For Samsung Galaxy S7 Edge
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21 |