2009/8/10 Shawn <sgro...@open2space.com>:
>
> ALL the functions (load, get, post, etc) are wrappers for the $.ajax()
> function.  I only use $.ajax() now and tweak it to meet my needs... Makes
> for less confusion.
>
> Ajax by default will only load files that are in the same domain as the
> calling page.  This is a browser security feature.  (Use $.ajax() and jsonp
> to work around that.)  So the getScript() function will follow this
> limitation as well if it is calling the new script via Ajax.

getScript() and get() requesting JSONP are the odd ones out - the
ajax() method detects these cases and loads them by creating a
<script> element and injecting it into the DOM, so the same-origin
policy doesn't apply.

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/

Reply via email to