I have a mysql table with a column containing a list of names.
Can anybody tell me the best plugin or solution for making an autosuggestion list in my form input field using jquery?
I need something which supports
$query = "SELECT * FROM my_table WHERE name LIKE '%$_POST[]"name"%' ";
limiting to 10
I need a package including js libraries and php files.
I need the smartest and powerful autocomplete solution which check for matches in my every key stroke, available today.
Thanks in advance.
blasteralfred
jQuery UI auto complete, you will need the do the server side interaction code though.
http://jqueryui.com/demos/autocomplete/
Related
I am currently monitoring 38 individual LED Lighting current and the data is being displayed/imported to a MySQL table. However, that is not what I want to achieve. I want to instead have a concept similar to a table you see in Stock market, where the values(current) are being replaced every other minute or so. Please do advice on how I am suppose achieve the desired outcome. Thank you.
You can use MySQl Acceding or Descending order and short the values.
like as
SELECT * FROM `table-name` ORDER BY `LED` DESC
I suggest you use some kind of JS graph library.
You can make a PHP script the get you data from the database, and use ajax to reload your data into a graph.
I'm, suggesting using HighChart.
This is a good example: Auto Update Highcharts with Ajax
I have 4 drop-down lists / group of checkboxes in I need that after making a selection in any one list the options available in the other 3 lists change accordingly...either are not available for selection or are not present in the list itself.
I'm coding using PHP & MYSQL
Could someone please help me with this. I'm new to PHP.
This can not be done with just PHP and MySQL. You need to use Javascript or jQuery. jQuery is the easiest to learn.
You can do it but very hard. You should use jQuery, it's easier than PHP.
I have two dropdown list in my page i.e Location and Employee.
What I want to do is that I want to filter the employee according to the location.
That is ,,, When I select location Delhi than all the employees at delhi location are came into employee dropdown.
Is it possible in PHP????
Please help me out
That is not possible using just PHP unless you are okay with a page refresh in between. There are many ways to do this in JavaScript, have you tried using JavaScript?
EDIT: There might be some complex way using CSS3 selectors, but even if there is I would not advise doing it.
yes nothing is imposible. you can do it.. but you have to use scripting languages like ajax to accomplish that.. If you need more help please post your code....Yuo could find the answer here..
Populating second drop down based on selection of first with value from first database
Yes it's possible using php with ajax implementation.
Here's a good tutorial in which country, state, city example given. Hope this will help you.
http://roshanbh.com.np/2008/01/populate-triple-drop-down-list-change-options-value-from-database-using-ajax-and-php.html
Hey guys, there is a form where the user select some of his friends and I'm curious on how I can implement a list that searches simultaneously while the user is typing a friend's name and when he selects the name the name is written in the text box(jQuery). And if the user wants to select more than one friend, when I'm inserting the names in the database, how can I separate the names that are written in one input field?
You should take a look at the jquery auto-complete plugin:
http://docs.jquery.com/Plugins/autocomplete
Also, you could separate the names using commas.
Are you looking to write your own plugin or would you like to use an existing one?
If you want something ready made, here are a few examples
if you want something extremely light, only 6kb packed, this one would be the best choice
Autosuggest jQuery Plugin
Older one but still good
Tokenizing Autocomplete
This what already asked here on this site.
Facebook style JQuery autocomplete plugin
The accepted answer cited this jQuery code.
https://github.com/loopj/jQuery-Tokenizing-Autocomplete-Plugin
http://jqueryui.com/demos/autocomplete/
Although think twice about including the whole jquery ui library for this one plugin
I've implemented this a couple of times, it is not that difficult to achieve decent results and the basic idea that I used was...
1) create an input box.
2) create a div positioned directly underneath the input box.
3) create a jquery keypress handler. if there are more than x characters typed, ajax request.
4) loop through the results, and if they exist, append result divs to the result box.
5) show the result box.
I can dig up some example code if you would like. Not sure what you are talking about with the select multiple, but you could keep a variable of selected, and change the color of the result div when it is clicked on, this way many results can be selected and then processed later.
i would like to use multiple filter options for all columns with using select form object.
When a columns filter selected, other select object options may filled to this selection.
Clearly, i want to filter jqrid columns as same excel filter feature.
I use php for server side.
Thank your very much for your help and suggestions already now.
What you want to implement should be combination of the usage of Toolbar Searching (see this demo as an example and the usage of 'change' custom event handle as dataEvents inside of the searchoptions. Inside of your 'change' handle you can make an ajax request to the server and then rebuild <select> element of the second drop-down list.
You can find more examples used the same technique with editoptions. Both work based on the same idea. The technique is not simple, but it works. I recommend you to read this thread.