I am trying to get around the lack of support for XDomainRequest in IE6. I think I have a solution but was wondering what the opinion is on this approach?...
I only need to perform GET
requests, so instead of trying to create an XDR object, I dynamically append a new script
tag to the page when I need to (onclick
). The src
of the tag would contain all the necessary parameters in the query string. Then I can return the content from the server.
The clever/ugly bit would be to wrap the content in a javascript function that would otherwise have been the onload
function of the XDR instance. So what I would effectively be returning is some script containing a function with the xdr.responseText value already inside it.
Thoughts?