-
Notifications
You must be signed in to change notification settings - Fork 640
Cross domain ajax using JSONP #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Juriy Zaytsev I think such functionality is definitely useful. The content becomes more dynamic and "mashups" - more popular. Having a robust way of fetching JSON from remote hosts is a must. |
Juriy Zaytsev I was experimenting with this some time ago http://github.com/kangax/protolicious/tree/master/get_json.js |
Kyle Simpson I've just added a plugin for Prototype to use flXHR (http://flxhr.flensed.com) for cross-domain Ajax. Since flXHR is completely the same API as native XHR, it just plugs right in and works exactly like regular Ajax calls -- no other code changes needed. |
Valery friends, so, there is still no JSONP for PrototypeJS?.. |
Juriy Zaytsev @valery Did the script from "protolicious" work for you? |
Dan Dean @Juriy: Is the core team still interested in adding this to Prototype? If so, would this be a suitable solution? It's based on a gist by Tobie Langel with some added functionality for various phases of the life cycle, including onFailure. |
Dan Dean I've added this feature to Github along with documentation and explanation: |
Kyle Simpson I've also got another project for doing simple JSON-P cross-domain calls via the XHR API interface: jXHR http://mulletxhr.com |
ronin-24025 (at lighthouseapp) I did a ton of research on cross-domain ajax: flash-based techniques, JSONP, proxying techniques, Kris Zyp's WindowNameRequest technique. Executive summary: |
Amit Kumar Hey... so what's the status on the Ajax.JASONRequest.?? |
Jason Laumeister I've had success with prototype 1.6.1 and Dan Dean's jsonp implementation here: https://github.com/dandean/Ajax.JSONRequest |
Alexander Vassbotn Røyne What is the status on this issue? |
previous lighthouse ticket #333
by Christopher Thomas
we should definitely look at how to port jquery's getJSON() method because it's just a very simple and easy way to obtain information from another website, without messing around building your own script handler.
I believe there was an attempt to make a <script> transport for prototype, to a degree, it worked, however it lacked the ability to use a callback when the contents of the tag were finally loaded (when usually you'd expect an onload event, there is none, so the callback method for JSONP allows you to insert a callback so when it executes, it's because the contents has loaded (otherwise the callbac wouldnt run either). The sample implementation that I tried was this:
http://ajaxian.com/archives/prototype-extension-dynamic-script-pattern-support
but it is not foolproof and with some work, it could provide us with a
The security problems this causes are merely in the hands of the developer if they should choose to use it, like in jquery, it's a gun, you point it at your website, or at your head, where you pull the trigger, is up to you. But I think this feature would really rock.</p>
The text was updated successfully, but these errors were encountered: