Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

86
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda