Or, try the flXHRproxy plugin for jQuery... better cross-domain Ajax! http://flxhr.flensed.com/jquery.php
--Kyle On May 15, 5:31 am, Ricardo <ricardob...@gmail.com> wrote: > On May 14, 7:13 pm, hj2aj <jianyi.huan...@gmail.com> wrote: > > > > > > > Hi there, > > > I am having a problem with the cross domain issue that AJAX has. > > According to jQuery.ajax documentation, it should handle cross domain > > request with "script" and "jsonp" as data type. However, I cannot > > manage to get the following works: > > > There is no error according to FireBug, all alerts were executed > > except the ones in 'success' and 'error' functions. The above example > > is very similar to something in Ubiquity developed by Mozilla, it > > works even with dataType: "text", but in the 'success' function, it > > passed down a parameter and eval it. (I wonder whether in Mozilla it > > has a proxy to handle such request) > > > jQuery.getScript() can handle cross domain request for sure, and it is > > based on jQuery.ajax with hardcoded dataType: "script", however, I > > still want to have the request made on jQuery.ajax because it provides > > more controls. > > > Can anyone please let me know why my example does not work, thanks!! > > jQuery adds a query string to the URL to avoid caching by default, > likehttp://j.maxmind.com/app/geoip.js?_=1242383380394. As you can see > that results in a blank page. Add cache: true to the ajax options and > it should be fine. > > cheers > -- ricardo- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---