อยากทราบวิธีการแก้ไขปัญหา Uncaught TypeError: Cannot read property '0' of undefined ใน javascript

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: อยากทราบวิธีการแก้ไขปัญหา Uncaught TypeError: Cannot read property '0' of undefined ใน javascript

Re: อยากทราบวิธีการแก้ไขปัญหา Uncaught TypeError: Cannot read property '0' of undefined ใน javascript

โดย mindphp » 06/03/2020 4:49 am

เช็ค ไฟล์ปลายทางว่า response อะไรกลับมาให้หรือเปล่า

อยากทราบวิธีการแก้ไขปัญหา Uncaught TypeError: Cannot read property '0' of undefined ใน javascript

โดย Ittichai_chupol » 27/02/2020 8:04 pm

ผมได้สร้างระบบสำหรับการอัพโหลดรูปภาพ โดยจะเป็นระบบที่อัพได้ครั้งละหลายๆไฟล์ โดยใช้ javascript เข้ามาช่วยในการทำงานสำหรับการอัพโหลด แต่ก็มีการพบปัญหาว่าเมื่อมีการอัพโหลดไปแล้ว มีการการใช้งานไม่ได้ แล้วเมื่อตรวจสอบ console พบมีแจ้งปัญหาดังนี

โค้ด: เลือกทั้งหมด

posting.php?mode=post&f=2:1030 Uncaught TypeError: Cannot read property '0' of undefined
    at a.FileUploaded (posting.php?mode=post&f=2:1030)
    at a.dispatchEvent (plupload.full.min.js?assets_version=183:30)
    at a.trigger (plupload.full.min.js?assets_version=183:14)
    at r.<anonymous> (plupload.full.min.js?assets_version=183:30)
    at Array.<anonymous> (plupload.full.min.js?assets_version=183:14)
    at n (plupload.full.min.js?assets_version=183:14)
    at Object.d [as inSeries] (plupload.full.min.js?assets_version=183:14)
    at r.dispatchEvent (plupload.full.min.js?assets_version=183:14)
    at r.trigger (plupload.full.min.js?assets_version=183:14)
    at r.done (plupload.full.min.js?assets_version=183:30)

จึงอยากทราบว่าจะมีวิธีการแก้ไขอย่างไรครับ
Selection_999(2532).png
Selection_999(2532).png (42.32 KiB) Viewed 3380 times

ข้างบน