Click here to Skip to main content
15,902,636 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Unable to get property 'childNodes' of undefined or null reference

In IE9 there is no Error is Coming While Uploading an Document
Same Code In IE10 Document is Loading. But Not Display in grid The Above Error is Coming " Unable to get property 'childNodes' of undefined or null reference "
JavaScript
function GetEqrDataUploadFiles()
{
var upload=$("#files").data("KendoUpload");
//   in this line Error is coming     " Unable to get property 'childNodes' of undefined or null reference "

var s = upload.wrapper[0].childNodes[2].childNodes.length;

var a = new Array();
for (i = 0; i < s; i++)
{
if (document.all) {
a.push(upload.wrapper[0].childNodes[2].childNodes[i].innerText);
}
else {
a.push(upload.wrapper[0].childNodes[2].childNodes[i].textContent);
}
}
return a;
}
Posted
Updated 2-Jun-14 3:14am
v3
Comments
Kornfeld Eliyahu Peter 2-Jun-14 9:08am    
Can you show us the code with the problem?
siva Prasad Paruchuri 2-Jun-14 9:16am    
The Above code is Working Fine in IE9 but In IE10 the Javascript Error is coming
Kornfeld Eliyahu Peter 2-Jun-14 9:16am    
Kendo Uploader had a known bug with IE10 - are you sure you are using the latest version?
siva Prasad Paruchuri 2-Jun-14 9:21am    
We updated the Slick Grid Package via NuGet Package Installer. and then Checked in IE10 There is no Result. Same Error is Generating.
Kornfeld Eliyahu Peter 2-Jun-14 9:33am    
You may try this: $("#files").kendoUpload();

1 solution

I think I got you... You try to push selected file names in an array...
The problem is that the rendering of Kendo UI is different from browser to browser, so you have to use Kendo UI API for the specific control (Uploader in our case) and not try to access it using plain JavaScript!

http://docs.telerik.com/kendo-ui/api/web/upload[^]

JavaScript
$("#files").kendoUpload({
  upload: onUpload
});

function onUpload(e) {
  // Array with information about the uploaded files
  var files = e.files;

  $.each(files, function () {
    // push this.name to whatever array you want...
  });
}
 
Share this answer
 
v3

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