473,396 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

6 dropdown boxes populated from PHP/MySQL using Ajax

24
hi
i want to use a dropdown box to populate another dropdownbox and so on but i want to maitain all the data adt was selected from d previoce box and i dnt want to make use of submit button but the dropdown must triger the changes assoon as its value gange

can anyone hlp
Feb 7 '07 #1
41 8218
ronverdonk
4,258 Expert 4TB
Ever thought of using JavaScript for that? Certainly not PHP.

Ronald :cool:
Feb 7 '07 #2
hdf
24
Ever thought of using JavaScript for that? Certainly not PHP.

Ronald :cool:
hi how can i go about doing dat
Feb 7 '07 #3
ronverdonk
4,258 Expert 4TB
Where do you want your dropdown box to be populated from?

From data that is stored in your program or from a server database?

That makes a big difference, because in the first case you simply trigger a JS routine that fills another box.

In the second case you let the triggered JS routine make contact with the server to get the data (using Ajax) and then let that populate the next dropdown.

For both options is a solution.

Ronald :cool:
Feb 7 '07 #4
hdf
24
Where do you want your dropdown box to be populated from?

From data that is stored in your program or from a server database?

That makes a big difference, because in the first case you simply trigger a JS routine that fills another box.

In the second case you let the triggered JS routine make contact with the server to get the data (using Ajax) and then let that populate the next dropdown.

For both options is a solution.

Ronald :cool:
i want it to read from the database
Feb 7 '07 #5
ronverdonk
4,258 Expert 4TB
In order to understand the process of Ajax, see demo's named Dynamic client lookup and Chained select boxes at site Ajax scripts

The first one uses the server database top get the info. The second fills a drop down.

When you have questions left, come back here.

Ronald :cool:
Feb 7 '07 #6
hdf
24
In order to understand the process of Ajax, see demo's named Dynamic client lookup and Chained select boxes at site Ajax scripts

The first one uses the server database top get the info. The second fills a drop down.

When you have questions left, come back here.

Ronald :cool:
hi how do i link up 5 dropdown boxs to eachother.e.g
dropdown1 i select the value and it populate dropdown2 dan i select from dropdown2 and it poulates dropdown3 ans son

how can it b done and it must contain the selection tru outh the proces

Thank you
Feb 8 '07 #7
ronverdonk
4,258 Expert 4TB
I have (very simple) sample scripts for this. Although it is not my habit of making complete code sets available, I will make an exception in this case because it would be a never ending thread to display and comment the code involved.

I have sample code whereby 6 drop-down boxes are filled, each one depending on the choice in the previous one. The data to populate these boxes is coming from a MySQL database.

The code for this contains 3 simple scripts:
  1. client script building the screen and executing the JS requests to the server
  2. a PHP program that is invoked by the client JS. It performs the required MySQL selects, builds the fileld dropdown box and sends the result back to the client.
  3. the Ajax.js include lib (Simple AJAX Code Kit (SACK)), used for handling the httpRequests, which is not developed by me, but by Gregory Wild-Smith, under a modified MIT license.
When you are interested in this code I will send it to the email address of anyone interested. In that case send me your email address.

Ronald :cool:
Feb 8 '07 #8
acoder
16,027 Expert Mod 8TB
Why not just include an attachment (in a zip file) instead of having to email everyone who asks for it?
Feb 8 '07 #9
roven. i need the code.



javaram



I have (very simple) sample scripts for this. Although it is not my habit of making complete code sets available, I will make an exception in this case because it would be a never ending thread to display and comment the code involved.

I have sample code whereby 6 drop-down boxes are filled, each one depending on the choice in the previous one. The data to populate these boxes is coming from a MySQL database.

The code for this contains 3 simple scripts:
  1. client script building the screen and executing the JS requests to the server
  2. a PHP program that is invoked by the client JS. It performs the required MySQL selects, builds the fileld dropdown box and sends the result back to the client.
  3. the Ajax.js include lib (Simple AJAX Code Kit (SACK)), used for handling the httpRequests, which is not developed by me, but by Gregory Wild-Smith, under a modified MIT license.
When you are interested in this code I will send it to the email address of anyone interested. In that case send me your email address.

Ronald :cool:
Feb 8 '07 #10
hdf
24
I have (very simple) sample scripts for this. Although it is not my habit of making complete code sets available, I will make an exception in this case because it would be a never ending thread to display and comment the code involved.

I have sample code whereby 6 drop-down boxes are filled, each one depending on the choice in the previous one. The data to populate these boxes is coming from a MySQL database.

The code for this contains 3 simple scripts:
  1. client script building the screen and executing the JS requests to the server
  2. a PHP program that is invoked by the client JS. It performs the required MySQL selects, builds the fileld dropdown box and sends the result back to the client.
  3. the Ajax.js include lib (Simple AJAX Code Kit (SACK)), used for handling the httpRequests, which is not developed by me, but by Gregory Wild-Smith, under a modified MIT license.
When you are interested in this code I will send it to the email address of anyone interested. In that case send me your email address.

Ronald :cool:
hi
is send u the pm n waiting for the code thnx
Feb 9 '07 #11
aniltc
17
hi all

i need the code for 6 drop down list box using AJAX.I have done something similar to this using 3 drop downe.But values are not retaining.please help me out and please show me some examples.

Thanks
Feb 13 '07 #12
ronverdonk
4,258 Expert 4TB
then pm your email address.

Ronald :cool:
Feb 13 '07 #13
aniltc
17
then pm your email address.

Ronald :cool:
I have send it.But the code you have given look like jung values.I am not able to read.please send me once more as a Zip file or Rar files

Thanks and Regards
ANIL
Feb 14 '07 #14
aniltc
17
you have send the code twice But i am not able to raed it.which alnguage is this?
please help me.i am in a deep trouble
Feb 14 '07 #15
ronverdonk
4,258 Expert 4TB
Once I have send it as a ZIPped file, the second time all separate files (.php, .js and .sql). You must have a problem in your mail client or in your firewall.

All other requestors have received it in the correct format. (ZIP or separate files).

Ronald :cool:
Feb 14 '07 #16
ronverdonk
4,258 Expert 4TB
We solved it. I sent the files as attachments using Outlook Express to a gmail account. That screwed it really up. All files were send as binaries. Whatever I did a the OE side, it did not help.

So I send them again from my own gmail account and that worked fine.

So anyone who runs into this sort of problem (screwed up attached files sent from Outlook express to gmail), get a gmail account!

Ronald :cool:
Feb 14 '07 #17
rossco
1
Hi,

I was wondering if it would be possible to get a copy of this code for the 6 linked drop-down boxes. i only need it for 3 where the 2nd and 3rd values are fetched form a MySQL db dependent on the previous option.

Thanks in advance.
Mar 5 '07 #18
ronverdonk
4,258 Expert 4TB
Hi,

I was wondering if it would be possible to get a copy of this code for the 6 linked drop-down boxes. i only need it for 3 where the 2nd and 3rd values are fetched form a MySQL db dependent on the previous option.

Thanks in advance.
You can have this code 'as is', i.e. 6 drop downs, each one filling from MySQL select. Send me a pm with your email and I'll send you an Omnidrive link.

Ronald :cool:
Mar 5 '07 #19
hi! I would like you will send me this script, ajax 6 drop down box.please, at <email_removed>.
Merci man
Mar 16 '07 #20
Hello, Can you please send me the script for the dropdown chain as well..

my email is removed by admin

Thank Yuo very much,
Adam
Mar 20 '07 #21
then pm your email address.

Ronald :cool:

Please send me your example. I've been messing around with an example
You select countries, 2nd box fills with cities. The original example code didn't interface with mysql.

If you would share your " 6 dropdown boxes populated from PHP/MySQL" , I could get on with the rest of my project.

Thanks in advance for your help.
Mar 22 '07 #22
Hi there can i get also get a copy of your code
Mar 28 '07 #23
i also need that code for the dropdowns at <email_removed> i need it like yesterday does it come with an example on how to use it? Thanks
Sep 15 '07 #24
ronverdonk
4,258 Expert 4TB
i also need that code for the dropdowns at fulcher1738@yahoo.com i need it like yesterday does it come with an example on how to use it? Thanks
Sent to requestor.

Ronald
Sep 15 '07 #25
momogi
28
I have (very simple) sample scripts for this. Although it is not my habit of making complete code sets available, I will make an exception in this case because it would be a never ending thread to display and comment the code involved.

I have sample code whereby 6 drop-down boxes are filled, each one depending on the choice in the previous one. The data to populate these boxes is coming from a MySQL database.

The code for this contains 3 simple scripts:
  1. client script building the screen and executing the JS requests to the server
  2. a PHP program that is invoked by the client JS. It performs the required MySQL selects, builds the fileld dropdown box and sends the result back to the client.
  3. the Ajax.js include lib (Simple AJAX Code Kit (SACK)), used for handling the httpRequests, which is not developed by me, but by Gregory Wild-Smith, under a modified MIT license.
When you are interested in this code I will send it to the email address of anyone interested. In that case send me your email address.

Ronald :cool:
Hi, ronver..
I really need the code..
would you send me, pls? I'v just sent my email to U (PM)...
-thanks-
Sep 19 '07 #26
kmithu
11
Well if you are familiar with Ajax, then you can use the Update Panel. How many update panels are to be put entirely depends upon your functionality. This will serve your purpose but be careful while placing them. After putting drop downs in update panel, make the UPDATE MODE property of update panel CONDITIONAL and drop down list AUTO POST BACK Property TRUE. Then bind the dropdown with your database.Hope this works out for you!
Sep 19 '07 #27
ronverdonk
4,258 Expert 4TB
Well if you are familiar with Ajax, then you can use the Update Panel. How many update panels are to be put entirely depends upon your functionality. This will serve your purpose but be careful while placing them. After putting drop downs in update panel, make the UPDATE MODE property of update panel CONDITIONAL and drop down list AUTO POST BACK Property TRUE. Then bind the dropdown with your database.Hope this works out for you!
Can you give us a hint as to what problem/qeuestion in this forum your post is related? I cannot find any question related to any Update panel or Update mode. Otherwise, could you explain what you are referring to?

Ronald
Sep 19 '07 #28
momogi
28
hi Ron,,,

I've received the code. Thx, thx... :)

But, may I ask u something more? Would u give me a reference to learn about ajax? a site or something else...

I'v try ur code and I'll try it on my project...
Sep 21 '07 #29
bugboy
160 100+
Heya ronverdonk,

I would love to have a look at the 6 dropdown cascade code, if you could email it to me at <email_removed> that would be great. I really appreciate it.

Thanks! BugBoy
Sep 21 '07 #30
acoder
16,027 Expert Mod 8TB
But, may I ask u something more? Would u give me a reference to learn about ajax? a site or something else...
Check out the Ajax tutorial links in Offsite Links in the Javascript/Ajax forum. You can also see an example in the Articles section.
Sep 23 '07 #31
JohnMV
5
Hi ,can i too, get a copy of your code.

Could you please mail me the code to <email_removed>

Thanks!!
John.
Oct 3 '07 #32
ronverdonk
4,258 Expert 4TB
Hi ,can i too, get a copy of your code.

Could you please mail me the code to <email_removed>

Thanks!!
John.
Sent it to you.

Ronald
Oct 3 '07 #33
I have (very simple) sample scripts for this. Although it is not my habit of making complete code sets available, I will make an exception in this case because it would be a never ending thread to display and comment the code involved.

I have sample code whereby 6 drop-down boxes are filled, each one depending on the choice in the previous one. The data to populate these boxes is coming from a MySQL database.

The code for this contains 3 simple scripts:
  1. client script building the screen and executing the JS requests to the server
  2. a PHP program that is invoked by the client JS. It performs the required MySQL selects, builds the fileld dropdown box and sends the result back to the client.
  3. the Ajax.js include lib (Simple AJAX Code Kit (SACK)), used for handling the httpRequests, which is not developed by me, but by Gregory Wild-Smith, under a modified MIT license.
When you are interested in this code I will send it to the email address of anyone interested. In that case send me your email address.

Ronald :cool:
i stumbled upon this thread, and read about your 6 select boxes.

i too need your help on the codes. i've pmed you already :)

thank you~
Oct 5 '07 #34
lizaa
5
I aslo need this code badly
i sent you a pm ..

Thnaks
Oct 9 '07 #35
Please send me the code also. I am working on a three drop down. <email_removed>
Oct 9 '07 #36
hai,

send me the code tooo.... <email_removed> ... Thnx Thnx
Oct 10 '07 #37
Hi,

I would appreciate if u could send the code. My id is <email_removed>
Thanks
Oct 13 '07 #38
Hi,

Can you please send me to the code as well. I'd be very appreciated!

<email_removed>
Oct 19 '07 #39
Hi,

My name is wan. Can you please send me to the code as well. I'd be very appreciated! Here's my email: <email_removed>
Oct 25 '07 #40
denzil
1
Hi there,

Please could you send me the code as well, it would be most appreciated.

My email address is: <email_removed>

Many thanks,
Denzil
Oct 25 '07 #41
can anyone please send me the code also. my email is <email_removed>
Nov 19 '09 #42

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: reneeccwest | last post by:
Different user input boxes are automatically populated based on a value of the dropdown box. Can anyone help me on that?
8
by: Kris Rockwell | last post by:
Hello, I have done the following to bind data to a DropDown box: 1. Drag SQLServer table onto web form to create data connection and data adapter. 2. Generate dataset by right-clicking on...
2
by: Jason James | last post by:
Hi, I have a datalist that contains a series of thumbnails. I am in the process of paging this datalist so that only 20 images are displayed at a time. Each image has associated with it a...
3
by: femin | last post by:
Hi all, I am trying to develope one web application using vb.net. i have two dropdownlist boxes.1st ddlist i am binding on page load event. The 2nd ddlist i am populating by ajax by taking the id...
4
by: AccessRookie | last post by:
Ok, I am pretty new to Access (Using Access 2002 at my job). Here is what I want to do. I want to create a database that has a form. On this form will be a dropdown menu (combobox). Depending...
11
by: eureka | last post by:
Hi All, I'm training in Servlets, JSP and JavaScript, I have a web page in which there's a "StudentName" textbox and below it is a "Names" Dropdown list. Initially the Textbox is empty and...
5
Tann3r
by: Tann3r | last post by:
Apache.v2.2.4, MySQL.v5.0.27, PHP5.2.1 I have a table of projects which has been dynamically created from an SQL query. I have several dropdown boxes which have been populated from other tables...
3
by: gab | last post by:
Hi I am very new to this and is stuck trying to make this work... :-( I want a 2 dropdown box'es which is populated from a mysql db (that I can do, I think :-p ) $sql="SELECT X FROM table WHERE...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.