insertRow(undefined) TypeError: tab.insertRow is not a function
Content
Hi Experts,
I'm trying to build a page where I can give functionality to the user to add a row in a table by clicking on some button. For this, I have created a simple js function and calling on button event. Here is the snip of javascript code
PageModule.prototype.insertRow = function(event){
var tab = document.getElementById("oj-table--490912658-1");
tab.insertRow(0)
}
While clicking on the button, getting error as below
log.js:22 [VB (ERROR), /vb/action/action/CallModuleAction]: Action callModuleFunction1_ian8bf9vd: error running custom action: insertRow(undefined) TypeError: tab.insertRow is not a function
at PageModule.insertRow (main-start-page.js:8)
Tagged:
0