I am very new to Jquery and I need to setup basic HandsonTable in our project.
We downloaded the “handsontable-master.zip” file and uploaded this to our server. We did not install using “bower” tool but just uploaded the folder on the server.
But when we load the page, we see following error:
SCRIPT5007: Unable to get property ‘insertBefore’ of undefined or null reference
Are we missing any file references which are not mentioned in the document?
The doc lists only 2 files to be added: handsontable.full.css & handsontable.full.js
link rel=“stylesheet” media=“Screen” href="/src/hotable/dist/handsontable.full.css">
script src="/src/hotable/dist/handsontable.full.js">
script type=“text/javascript” charset=“utf-8”>
var data= [
["", “Ford”, “Volvo”],
[“2014”, 10, 11],
[“2015”, 50, 51]
];
var container = document.getElementById(“hotsheet”);
var hot = new Handsontable(container, {
data: data,
minSpareRows:1,
rowHeaders: true,
colHeaders: true,
contextMenu: true
});
/script>
div id=“hotsheet”>
We are experiencing following error:
SCRIPT5007: Unable to get property ‘insertBefore’ of undefined or null reference
handsontable.full.js, line 4049 character 3
Hi @aalap_sharma, this kind of error occurs when first argument passed to the Handsontable isn’t element. You should try to retrieve element (#hotsheet) before it’s created. Try to move div#hotsheet before script tag.