Hi frnds,
I m new to ajax. I have implemented the ajax autocomplete
<ajax:autocomplete
source="tag"
target="make"
baseUrl="autocompleteTag.htm"
className="autocompleteTag"
indicator="indicator1"
minimumCharacters="1"
parser="new ResponseXmlToHtmlListParser()" />
this my partial code.

The problem is that when i press any alphabet say suppose "a", i get all names starting with "a" say amy, admin, anuj etc one below other. now when i select one of them say 'amy' the text box will display "amy,". Now when i press "a" again then it shows "amy,admin" & "amy,anuj" one below the other.
As i want to enter multiple values comma seperated. But i want the ajax to show only "admin" and "anuj" and when i select any one of this, it should append the the value previously present in text box(i.e it should append the value "amy").
It is possible to show the list but when i select the value it doesnot append the previously present value. It replaces a value..
Please reply to this...
I would be really thankful to u all..
Thanks.

Recommended Answers

All 3 Replies

It will be easy for us to help you if you are a little more specific.
are you using db for fetching data or from array?
I assume you are using db then it is very easy
like

SELECT * FROM table_name WHERE `field_name` LIKE 'a%'

you can get these results instantly by using AJAX
I think this method is much more efficient than the above one u r using.

Thanks Danish for ur reply..
I used attribute named appendSelector = "," which overcome this problem.

Hi,
I m new to ajax. I have got a problem similatr to yours I need to provide a multiple autocomplete textbox, Just as you said I have to enter more than one values into the textbox using a (,) comma seperator.But I have to it using ajax-php-mysql

I would be really thankful to you
Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.