var nextRow = tbl.tBodies[0].rows.length;
var row = tbl.tBodies[0].insertRow(nextRow);
row.setAttribute('ondblclick', "return move_to_x_graph();");
This code will add a double click event to the row. But the fact is that it does not work in the case of Internet Explorer. It works fine in all other browsers.
To add style, I process this:
var cell2 = row.insertCell(1);
var browser = navigator.appName;
if (browser == "Microsoft Internet Explorer") {
cell2.style.setAttribute("cssText", "color:black; width:300px;");
} else {
cell2.setAttribute("style", "color:black; width:300px;");
}
Can anyone help me add a double click event using Javascript which will also work in Internet Explorer?
source
share