chronister Posted July 9, 2007 Share Posted July 9, 2007 Hello folks, I know jack about javascript(will learn one day). I need a 3 part drop down menu that will allow a person to select a state, city and store location (this info is pulled from a mysql db). I need the city and store location selects to be dependent on what is selected in the previous box. I found a script that almost does this on dynamicdrive.com It creates 3 drop downs, and I have successfully modified it to pull the states from the database, but I am not sure how to make the rest of the script dynamic. Would someone be interested in building this for me? Please either reply to this post or email me at the address in my profile and include your rates and the estimated time for this project. If anyone knows of a script already out there that does this kind of thing, please let me know. Thanks, Nate Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/ Share on other sites More sharing options...
RichardRotterdam Posted July 9, 2007 Share Posted July 9, 2007 Build it for you nope give you some hints yup. I have tried that dynamic trive thing way to much arrays and complicated javascript it can be done much easier. this is what you need to do. 1.) create select boxes and link them to javascript <select name="myselect" onchange="getValues(this.value)"> <option value="0">0</option> <option value="1">1</option> </select> 2.) trigger a ajax script when the value of the select is changed look for ajax scripts in tutorials and just modify it. 3.) When the ajax script has returned a value from your external php file you can manipulate your HTML using getElementById().innerHTML Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-293190 Share on other sites More sharing options...
chronister Posted July 9, 2007 Author Share Posted July 9, 2007 Just so everyone is clear. When I asked about building it for me, I was not meaning for free. It would be a paid project. I would have to get approval from the President of the company for this, but I don't see a problem on getting a budget for this. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-293298 Share on other sites More sharing options...
RichardRotterdam Posted July 9, 2007 Share Posted July 9, 2007 Sounds interesting I have the working code for the chain select using Ajax mootools. Only thing that has to be changed is that the php code to select the data from the mysql database. I assume you are familiar with php and mysql so that shouldn't be a problem. How much do you offer for the code? Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-293532 Share on other sites More sharing options...
nogray Posted July 9, 2007 Share Posted July 9, 2007 If you need any javascript or ajax help, I can help with anything. Just drop me a quick email. P.S. I can create a JS library to match your PHP classes if you're using OOP with easy to use syntax. Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-293851 Share on other sites More sharing options...
RichardRotterdam Posted July 10, 2007 Share Posted July 10, 2007 I noticed this topic was also on the php section. http://www.phpfreaks.com/forums/index.php/topic,148720.0.html you could also just modify one of these script which doesnt seem hard at all and one solution i noticed didnt envolve any js coding Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-293968 Share on other sites More sharing options...
chronister Posted July 10, 2007 Author Share Posted July 10, 2007 Sounds interesting I have the working code for the chain select using Ajax mootools. Only thing that has to be changed is that the php code to select the data from the mysql database. I assume you are familiar with php and mysql so that shouldn't be a problem. How much do you offer for the code? Dj Kat, thanks for your help in this and for pointing me to the other post. As far as price i concerned, I am not so much offering money for it, but looking for what you would charge for it. I am out of state right now for my job, but I am trying to gather some info as to what this kind of thing would cost so I can give the President of the company an estimate as to what I am going to need cash wise for this whole thing. So if you shoot me a price, I will add it to my notes in this project and will be meeting with the boss man in the near future to get a budget for this project. Thanks everyone for your suggestions and assistance on this. Nathan Chronister Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-294112 Share on other sites More sharing options...
chronister Posted July 14, 2007 Author Share Posted July 14, 2007 I thought I might have a solution but... nope. I am still looking for a script to do this. What would someone charge me to make this script? Basically I want it to function like this one on dynamicdrive.com, but be ajax and database driven. http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm I want the first box to be state, the second to be city and the third to be store. I need this to lookup the information from a database. The connection script is a user defined function called connecdb(); Then I basically need the 3 queries to be.... 1) $get_states="SELECT distinct(state) AS state FROM stores"; 2) $get_cities="SELCT distinct(city) AS city FROM stores WHERE state='$state_selected_1st_dropdown'"; 3) $get_stores="SELECT * FROM stores WHERE city='$city_selected_in_2nd_dropdown'"; We currently have 63 stores with a new one opening in a couple months and more on the way. So I want a person to be able to drill down to the store they want for contact forms and menus an such and I don't want this stuff hard coded in the script, I want it to be dynamic . What would someone charge me to do this?? Thanks, Nathan Quote Link to comment https://forums.phpfreaks.com/topic/59048-chained-select-menu/#findComment-298415 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.