When i insert a Button into cell5 button i can't click on button. How can i add a button in cell5 so it work properly.
function addOrder()
{
var book = $("#book_id").val();
var qty = $("#qty").val();
var price = $("#unit_price").val();
var total = $("#dts_total_price").val();
var table=document.getElementById("results");
var row=table.insertRow(-1);
var cell1=row.insertCell(0);
var cell2=row.insertCell(1);
var cell3=row.insertCell(2);
var cell4=row.insertCell(3);
var cell5=row.insertCell(4);
cell1.innerHTML=book;
cell2.innerHTML=qty;
cell3.innerHTML=price;
cell4.innerHTML=total;
cell5=document.createElement("BUTTON").innerHTML="Edit";
}
and here is my table which row generated dynamically.
Product Name Quantity Unit Price Total Price Edit