php - Jquery Autocomplete to populate tree based sepearated by a string


I have a requirement as follows:

I have to use autocomplete feature which will generate the text in input as follows: projectname.filename Where projectname is retrieved from one table and filename is retrieved from another dependent table. I have a code for autocomplete to one table. But, whenever I add '.' in input box, it should search for 2nd table for filenames for that respective project.

Can someone help me out on how to resolve this?

Here is the code, I used for retrieving data from one table. My requirement is, when I add '.', and start typing, it should populate based on that project name and show only filenames related to that project.

$( ".ac-default" ).autocomplete({
      source: "<?php echo base_url('MainController/get_projects_list'); ?>"

People are also looking for solutions to the problem: javascript - php ajax form submit dynamically

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.