{"id":461,"date":"2022-08-30T15:01:44","date_gmt":"2022-08-30T15:01:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/uncaught-typeerror-cannot-read-property-name-of-undefined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:01:44","modified_gmt":"2022-08-30T15:01:44","slug":"uncaught-typeerror-cannot-read-property-name-of-undefined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/uncaught-typeerror-cannot-read-property-name-of-undefined-collection-of-common-programming-errors\/","title":{"rendered":"Uncaught TypeError: Cannot read property &#39;name&#39; of undefined-Collection of common programming errors"},"content":{"rendered":"<p>I have the following code for when &#8216;choose file&#8217; is clicked:<\/p>\n<pre><code>$(':file').change(function () {\n\nif(this.files.length == 1) {\n    $('#selected_files').html(\"<\/code><\/pre>\n<h4><code>Attaching \" + this.files.length + \" file<\/code><\/h4>\n<pre>\");\n} else {\n    $('#selected_files').html(\"<\/pre>\n<h4><code>Attaching \" + this.files.length + \" files<\/code><\/h4>\n<pre>\");\n}\n\n$('#selected_files').append(\"<\/pre>\n<p>&#8220;); for(x=0;x<\/p>\n<table class=\"\\&quot;altShaded\\&quot;\">\n<tr>\n<td><\/td>\n<td>Filename<\/td>\n<td>Size<\/td>\n<\/tr>\n<\/table>\n<p id=\"rop\"><small>Originally posted 2013-11-09 19:43:48. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have the following code for when &#8216;choose file&#8217; is clicked: $(&#8216;:file&#8217;).change(function () { if(this.files.length == 1) { $(&#8216;#selected_files&#8217;).html(&#8221; Attaching &#8221; + this.files.length + &#8221; file &#8220;); } else { $(&#8216;#selected_files&#8217;).html(&#8221; Attaching &#8221; + this.files.length + &#8221; files &#8220;); } $(&#8216;#selected_files&#8217;).append(&#8221; &#8220;); for(x=0;x Filename Size Originally posted 2013-11-09 19:43:48.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}