Possible Duplicate:
Small Ajax JavaScript library
I'm programming a library that needs a function to load URLs asynchronously. I'd need the precise same functionality of $.get
, except I don't want to have jQuery as a dependency of my library for just one function. What is a self-contained snippet that allows for this?
I've tried several things but most of them are broken somewhere. For example, the most elaborate I could find would get the error Origin <url> is not allowed by Access-Control-Allow-Origin
on Chrome.