Jump to content

chained select menu


chronister

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.