473,406 Members | 2,336 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,406 software developers and data experts.

How to create Combo Box

I want to create Combo Box like in Google for my project using PHP and MySQL.
The term "combo box" is sometimes, incorrectly, used to mean "drop-down list". It is a combination of a drop-down list or list box and a single-line text box, allowing the user to either type a value directly into the control or choose from the list of existing options.
If I have table as follows,in the web page that I am going to create if I type 'au' in the combo box Australia should appear.I may or may not select it. For example,there I can type Austria without selecting Australia.

Id place
1 America
2 Australia
Jun 15 '10 #1
2 2126
dlite922
1,584 Expert 1GB
What you're looking for is Autocomplete or Autosuggest.

There are many scripts and tutorials in Google to help you start this off.

If you want to do this yourself, you need to know PHP and AJAX, then you can do it in 3 easy steps:


1. On the text boxes onchange() method call a javascript that takes the current value and asynchronously (ajax) calls a PHP page with this value.

2. PHP page finds the values in the DB and returns them.

3. Javascript parses results returned and displays them in a floating div under the text box.

Cheers,


Dan
Jun 15 '10 #2
sir,
Could you give me a sample code.And I do not know
AJAX. So could i make it possible only using php and javascript.
Jun 18 '10 #3

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

Similar topics

1
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command...
1
by: imw8n4u | last post by:
I need to create combo box that lists unique values from a table and limit the selection to this list. However, I also need to add "UNKNOWN" as a valid selection even though it is not in the table...
1
by: meganrobertson22 | last post by:
Hi Everyone- I am trying to use a simple macro to set the value of a combo box on a form, and I can't get it to work. I have a macro with 2 actions: OpenForm and SetValue. I can open my form,...
5
by: jjyconsulting | last post by:
Newbie needing some help. I have a tblParticipants. The fields include gender, education_level, income, occupation etc., I'm trying to create a form where a user can run a query from the form and...
3
by: saurabhnsit2002 | last post by:
Can anyone help me about how to create combo box with its items as checked boxes or radio buttons. This has to be done in C#. I have seen something similar to this named custom combo boxes but they...
2
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
0
by: dudeja.rajat | last post by:
Hi, I'm using Tkinter module to create a GUI application. I found that the combo box is not present in Tkinter module. It comes with Tix module. Could some one give me an example to create a...
0
by: dudeja.rajat | last post by:
On Mon, Aug 25, 2008 at 12:57 PM, <dudeja.rajat@gmail.comwrote: Ok...now I found the way to do that. But I'm stuck further. my code is as below: main module ********************** myRoot...
0
by: jerelp | last post by:
I've never used a linked list in sharepoint and I've never created cascading combox boxes. I don't know if it is possible to make a SQL statement from the linked list if so how do you do it? ...
4
by: sprahalad | last post by:
I have developed a form and on this form I have one combo box cmbDate. Please help me to fire a query to selected specified data from my master table everytime based on Combo Box date selection.
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.