Hi,
I am creating textboxes dynamically through javascript (will paste the code here). I want to use auto-complete functionality on that textboxes. P{lease help us out on this. below are my javascript code for generating textboxes.
function insRow() {
var tab = document.getElementById('POITable');
var size = tab.rows.length;
if (size == 1) {
DoPostBack();
}
else {
//console.log('hi');
var x = document.getElementById('POITable');
var new_row = x.rows[1].cloneNode(true);
var len = x.rows.length;
new_row.cells[0].innerHTML = len;
// var i1 = row.parentNode.parentNode.rowIndex;
// alert(i1);
var inp1 = new_row.cells[1].getElementsByTagName('input')[0];
inp1.id += len;
inp1.value = '';
inp1.style.width = 88 + "px";
x.appendChild(new_row);
}
}
I want to attach my User table to this to get usernames.
Anubhav ChaudharyPosted Jan 21, 2014, 11:00 PM
Sry I can't see anything attached.
Vishal KalePosted Jan 21, 2014, 7:06 AM
Thanks for the response.
My problem is I am generating text boxes dynamically with my above code, so how can I assign autocomplete source to the dynamically generated text boxes?
I am attaching my .aspx page here, kindly go through that and try to provide solution on this.
Thanks.
Anubhav ChaudharyPosted Jan 21, 2014, 6:29 AM
You can check my below given Article, I had provided code on the top of this Article so you can download code also:
http://www.c-sharpcorner.com/UploadFile/cd7c2e/create-an-auto-complete-list-like-google-using-jquery/