Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
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

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

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.

about 4 years ago · Juan Pablo Isaza Report

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

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!