Click here to Skip to main content
15,887,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have added autocomplete feature in my textbox but I click Add button then new row added but autocomplete wont work. below is my code.

What I have tried:

$(function() {
$("#skills").autocomplete({
source: 'textbox_auto_complete.php'
});
});

//Add Script

$('#product_table').DataTable();
$(document).on("click","#addRow",function(){
var table = $('#product_table').DataTable();
table.row.add(['','','']).draw();
});

//html
<table id="product_table" class="display" cellspacing="0" width="50%">
<thead>
<tr>
<th align="Center">Product Name</th>
<th align="Center">Quantity</th>
<th align="Center">Click Me</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="product_text skills" type="text" placeholder="Type Product Name" name="skills" id="skills" required="">
</td>
<span id="product_list"></span>
<td><input class="product_text" type="text" placeholder="Quantity" name="Quantity" required=""></td>
<td><input class="product_text" type="button" id="addRow" name="addRow" value="Add"></td>
</tr>
</tbody>
</table>
Posted
Updated 27-Jul-17 7:11am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900