Javascript error when adding a new record
Posted: Fri Sep 26, 2025 2:04 am
When ckicking on the Save button for a new record, this error appears:
"Uncaught TypeError: Cannot read properties of null (reading 'style') Please check the browser developer console for details."
Console reads as follows:
Lines 4853 to 4860 of nuform.js file:
"Uncaught TypeError: Cannot read properties of null (reading 'style') Please check the browser developer console for details."
Console reads as follows:
The error Uncaught TypeError: Cannot read properties of null (reading 'style') means that your code is trying to access the style property of a variable that is currently null. In the context of the DOM, this usually happens when you try to manipulate the style of an HTML element that doesn't exist or hasn't been found by your JavaScript code. The error stack trace indicates that this is happening within the nuSetBrowseColumns function in the nuform.js file, specifically on line 4957.nuform.js?ts=20250926015343:4957 Uncaught TypeError: Cannot read properties of null (reading 'style')
at nuSetBrowseColumns (nuform.js?ts=20250926015343:4957:12)
at nuDragTitleEvents (nucommon.js?ts=202509260153432)
at nuBuildForm (nuform.js?ts=20250926015343:145:2)
at Object.successCallback (nuajax.js?ts=20250926015343:193:4)
at c (jquery-3.7.1.min.js:2:25304)
at Object.fireWith [as resolveWith] (jquery-3.7.1.min.js:2:26053)
at l (jquery-3.7.1.min.js:2:77782)
at XMLHttpRequest.<anonymous> (jquery-3.7.1.min.js:2:80265)
Lines 4853 to 4860 of nuform.js file:
Code: Select all
function nuSetBrowseColumns(columnWidths) {
const padding = nuTotalWidth('nucell_0_0') - $('#nucell_0_0').width();
let left = 7;
columnWidths.forEach((width, i) => {
const columnElements = document.querySelectorAll(`[data-nu-column="${i}"], #nuBrowseTitle${i},#nuBrowseTitle${i}_select`);
columnElements.forEach(element => {
element.style.left = `${left}px`;
element.style.width = `${width}px`;
});
left += width + (width === 0 ? 0 : padding);
});
const browseFooterWidth = left - 7;
$('#nuBrowseFooter').css('width', `${browseFooterWidth}px`);
nuFORM.breadcrumbs[nuFORM.breadcrumbs.length - 1].column_widths = columnWidths;
if (nuCurrentProperties().browse_filtered_rows === 0) {
const nucell00 = document.getElementById('nucell_0_0');
** 4957 >>> nucell00.style.width = `${browseFooterWidth - 22}px`;
nucell00.style.zIndex = '2';
$("div[id^='nucell_']").not('#nucell_0_0').hide();
}
}