JQuery – how to get a key and value with autocomplete?

Jquery autocomplet is easy but when you have to get the key of the array and store into the database or just you want to get it’s a bit tricky.
I have used the jquery UI autocomplete feature with JSON object which you can create with given PHP code.
As soon as you choose a list of the values, key automatically gets populated into another hidden field. For sake of understanding I made it text field.
You can do whatever you want with that id!!







Share

7 thoughts on “JQuery – how to get a key and value with autocomplete?

  1. lakshmi

    please solve this problem
    var[value=’network’,’name=’active’,’passive’]
    will possible to in autocompleted to get the value

  2. Arun

    what i’m searching not there means i need to enter newly that time that id is should be null . how can set that key value input field should be null

Leave a Reply

Your email address will not be published. Required fields are marked *