Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
JavaScript
success: function (data) {
                debugger;
                $.each(data, function (i) {
                   $('#LiveDataTable').append('<tr><td>' + data[i].VehicleName + '</td>' +
                   $('#LiveDataTable th:gt(0)').each(function () {
                       debugger;
                       var id = $(this).attr("id");
                       var vehName = data[i].VehicleName;
                      ' <td>&nbsp;MN</td>'
                   })+'</tr>');
                });
            }


What I have tried:

Uncaught TypeError: Cannot read property 'childNodes' of null
Posted
Updated 26-Mar-16 19:52pm
Comments
Which line?
ZurdoDev 26-Mar-16 21:04pm    
That means something is null. Debug it and figure out why. We can't run the code for you.

1 solution

You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.

The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html[^]
https://www.jetbrains.com/idea/help/debugging-your-first-java-application.html[^]

Quote:
Uncaught typeerror: cannot read property 'childnodes' of null
For some reasons, a variable that you expect to be an object have failed to initialize and is set to Null instead. Thud the error when you try to access.
The problem is that you fail to check that the object is Ok after creation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900