Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

252
Vistas
error while passing JSON from php to javascript

So I have this php file which have query thats extract data from the DB to draw it on a Chart (Note : I'm using Chart.js lib), btw the chart working fine but in order to pass the value to the chart I have to use json_encode() built-in function to move the array to the javascript side using AJAX to display the array value in the chart but I'm getting this error in the image below:

https://i.stack.imgur.com/B0DZH.png

My PHP code : https://pastebin.com/tNh18qGX

My HTML & JS code : https://pastebin.com/06k9xbe8

Thank you guys.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Make sure that when you go to you're .php file the only value/text/anything displayed on the page is the json u want to be retrieve by the request.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda