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

87
Vistas
Ajax request with script tag inside

On a website i have 2 ajax function, the 1st one is working but the second is sending me script tag with the JSON. On local everything is working well and one of my AJAX function is working so i presume that my problem dont come from my host. Here is screenshot of my code & the return.

screenshot of ajax func

screenshot of what i get

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

The site you are making an ajax request to is returning the data + the script. If that site is yours then you should make it return the data only and never include scripts in APIs.

As you can clearly see in the received data that it returns the script + the data.

over 4 years ago · Santiago Trujillo Denunciar

0

So i fixed it, im using symfony, the problem came from my controller. In my return i was sending an object which isnt "jsonify" so it gaves me script tag to do it. But i still dont know why it worked on local

over 4 years ago · Santiago Trujillo 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