Skip to main content

Bug Tracker

Side navigation

#1559 closed bug (fixed)

Opened August 31, 2007 06:15PM UTC

Closed September 15, 2007 01:23PM UTC

Can no longer append script elements with a src attrib for an external domain.

Reported by: pmclanahan Owned by:
Priority: minor Milestone: 1.2
Component: core Version: 1.1.4
Keywords: append domManip ajax script Cc:
Blocked by: Blocking:

When writing a plugin that grabs JSON feeds from external domains ( for example) I need to be able to append a script element to the DOM. This is no longer possible due to the modifications to the domManip function in rev. 2428. This change forces jQuery to use $.ajax to get scripts which will fail for external domain requests because of browser security restrictions. It is easy to go back to pure DOM methods to append these script elements, but I believe that jQuery should be able to deal with this. The following code worked in 1.1.3, but no longer works in 1.1.4.


Note: The $.SCRIPT function is from Michael Geary's Easy DOM Creation plugin (

I should have a patch available for review shortly.

Attachments (1)
  • jquery_domManip.patch (1.1 KB) - added by pmclanahan August 31, 2007 08:20PM UTC.

    Patch against jquery.js

Change History (2)

Changed August 31, 2007 08:21PM UTC by pmclanahan comment:1

I created a test case:

And a patch (attached) which is tested above

Changed September 15, 2007 01:23PM UTC by john comment:2

resolution: → fixed
status: newclosed

Fixed in jQuery 1.2 - you can now append remote scripts.