It could have something to do with the fact that you never specified the
padding method in your url... (i.e. how are you telling the Flickr service
what function you want called from the return?) I believe most JSONP
services today allow you to pass something in the query string to indicate
what the name of your callback method is.
On 5/27/08, kalle saas
<kalle.saas-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:>
> Hey @ all,
> I tried to get started with the "JSONP" implementation wir
prototypejs. but
> i cant get it to work like i want to.
> The problem is, that i don''t get the json source in the FlickrTest
class.
> There are a lot of other implementation
> of this technic (i like the jquery approach http://tinyurl.com/5hbp77 ).
>
> Does someone have experience with this technic ?
>
> regards,
>
> kalle
>
>
>
> that basic example works, but realy basic :)
>
> var FlickrTest = Class.create({
> initialize: function(element, options) {
> this.updateElement = $(element);
> this.options = options || {};
> this.options.flickr_user_id = options.flickr_user_id ||
"13716838@N06"
> this.json_url = "";
> this.setup();
> },
>
> setup: function(){
> this.pullJSON();
> this.createDOM();
> this.addObserver();
> },
>
> pullJSON: function(){
> this.defineUrl();
> this.options.flickr_user_id = "13716838@N06"
> },
>
> defineUrl: function(){
> var base_url = "http://api.flickr.com/services/feeds/"
> var format = "&lang=en-us&format=json"
> this.json_url = base_url + "photos_public.gne?id=" +
> this.options.flickr_user_id + format
> var scriptElement = new Element(''script'', { src:
this.json_url })
> $$(''head'').reduce().insert(scriptElement);
> },
> });
>
> function jsonFlickrFeed(source){
> alert(source);
> }
>
>
> new FlickrTest( ''sample'', {flickr_user_id:
"13716838@N06" });
>
>
> Kalle Saas
> web: www.kallesaas.com <http://www.crosstheocean.de/>
>
>
>
>
>
>
>
> >
>
--
Ryan Gahl
Manager, Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
--
WebWidgetry.com / MashupStudio.com
Future Home of the World''s First Complete Web Platform
--
Inquire: 1-920-574-2218
Blog: http://www.someElement.com
LinkedIn Profile: http://www.linkedin.com/in/ryangahl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---