Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:44:53+00:00 2026-05-25T00:44:53+00:00

So, this question tells me that jQuery ajax requests don’t insert script tags into

  • 0

So, this question tells me that jQuery ajax requests don’t insert script tags into the DOM, but jQuery evaluates them instead. I am loading some content into a div, and in that div I have some buttons courtesy of AddThis. The code for these buttons includes a script from http://s7.addthis.com. jQuery doesn’t appear to be evaluating this script, I do not see my buttons. It happily evaluates another script from my own domain that is loaded in the same request.

Is there a way to tell jQuery to evaluate scripts from other domains, or is there a good reason for this behaviour which means I need to do this differently?

Thanks for reading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:44:53+00:00Added an answer on May 25, 2026 at 12:44 am

    jQuery’s ajax method abstracts a lot of the platform and use case specifics of making any type of asynchronous web request.

    You can call the ajax method with various combinations of parameters, and each time, a completely different workflow will be executed behind the scenes (synonyms for which include jQuery.get(), jQuery.post(), jQuery.getJSON(), jQuery.getScript()).

    In the situations where you are making a request to a web page on the same domain as the current page, then jQuery will not utilize <script> tags unless it is specifically told to (via setting the crossDomain to true). Instead, it will use the traditional method of AJAX; either the XMLHttpRequest Object (and fall back to the various Microsoft implementations of ActiveX).

    However, in situations where you are making requests to different domains, it is not possible to use these methods because of the same origin policy in all modern browsers. In these circumstances, jQuery.ajax will resort to using <script> tags (the technique is named JSONP).

    JSONP requires the response from the server to be formulated in a special way; namely valid JavaScript, which your response isn’t. It’s important to note that JSONP requires the cooperation of the server in this. For more information, read more in this question/answer, or on Wikipedia.

    Your code is working on your domain because it’s not required that the response from the server is valid JavaScript (which it isn’t). However, when ajax() start’s automatically using JSONP, your not meeting the valid JavaScript requirement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked this morning a question about a jQuery code that's not working (which
First off I'm not sure that's the proper title for this question but hopefully
I'm somewhat new to Ajax/Jquery, so I apologize if this is an easy question,
OK, this feels like a question that should be easy to answer, but as
Even before telling my question, will tell you that this is a very vague
Note that this is a follow-up question from my previous one: How to memorize
I love jQuery but am running into a problem with larger site and multiple
Simple question that is a flaw in my understanding of JQuery. $('input').focus(function() { $('.popup').click(function()
I already found this existing question Is this possible in XHTML: tags in a
I am hoping that someone can help me answer this question. I am writing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.