am creating the row dynamically in html table using id of input field in td of that table. table created properly with newly added rows and input box ids also created.but when I try to get that input box using id it throws null exception.
var cell1 = row.insertCell(1);
var element1 = document.createElement("input");
element1.name = rId + "_" + rowCount + "_newscheduledate";
element1.id = rId + "_" + rowCount + "_newschedueldate";
cell1.appendChild(element1);
alert(rowCount+" : "+rId); //here alert shows the values
var tt = document.getElementById(rId + '_' + rowCount + '_newscheduledate');
alert(tt); // here null comes
Exception comes like this
Error: document.getElementById(rId + ("_" + rowCount + "_newscheduledate")) is null