Ajax search results are appending not refreshing

I am new to ajax and facing with an issue.

Write now I won’t put code it’s not at full fedge will explain scenario please read with patience.


I have a search box and json data(city details like area, capital etc…) while enter keyword(ex: london) i am getting result upto now it is working fine.

Issue1: While entering keyword(ex: london) and clicked on search icon getting appropriate results, clicking again results are showing which are appedning to previous results which already exist

Issue2: Same issue as above backspace the keyword and enter another keyword and click on search icon showing results which are appending to the previous results(which got by previous keyword).

Hope you are understand the issues, if not please get back with reply will tell clearly probably with code if possible.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.