Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. unable to get property 'childnodes' of undefined or null reference

unable to get property 'childnodes' of undefined or null reference

Scheduled Pinned Locked Moved JavaScript
data-structureshelp
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10519661
    wrote on last edited by
    #1

    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;
    }

    Z Kornfeld Eliyahu PeterK R A 4 Replies Last reply
    0
    • U User 10519661

      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;
      }

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      This means that upload.wrapper[0] is null. You'll need to debug it to figure out why.

      There are only 10 types of people in the world, those who understand binary and those who don't.

      1 Reply Last reply
      0
      • U User 10519661

        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;
        }

        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu PeterK Offline
        Kornfeld Eliyahu Peter
        wrote on last edited by
        #3

        javascript Run Time Error[^]

        I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)

        "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

        1 Reply Last reply
        0
        • U User 10519661

          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;
          }

          R Offline
          R Offline
          Raviranjan_Kumar_Sinha
          wrote on last edited by
          #4

          Hi, From where you are calling function GetEqrDataUploadFiles(), can you try to call function GetEqrDataUploadFiles() from inside document.ready function if you are not? Thanks Raviranjan

          1 Reply Last reply
          0
          • U User 10519661

            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;
            }

            A Offline
            A Offline
            Anlige
            wrote on last edited by
            #5

            check the result of the follow code: alert(upload.wrapper && upload.wrapper.length);

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups