Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6538983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:48:07+00:00 2026-05-25T10:48:07+00:00

$.ajax({ url: http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&format=json&api_key=708f179518b2093d23f0aef284b565a4&photo_id=6115633659&jsoncallback=?, type: GET, cache: true, dataType:’jsonp’, success: function (data) { var largeSRC

  • 0
    $.ajax({
    url: "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&format=json&api_key=708f179518b2093d23f0aef284b565a4&photo_id=6115633659&jsoncallback=?",
    type: "GET",
    cache: true,
    dataType:'jsonp',
    success: function (data) {           

    var largeSRC = data.sizes.size.Original;

    alert(largeSRC);

    }
});

So yeah, basically, I have no clue how to… I don’t even know how to term it. I am trying to to get the URL for the original size.
http://www.flickr.com/services/api/explore/flickr.photos.getSizes

jsonFlickrApi({ "sizes": { "canblog": 0, "canprint": 0, "candownload": 1, 
"size": [
  { "label": "Square", "width": 75, "height": 75, "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74_s.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/sq\/", "media": "photo" },
  { "label": "Thumbnail", "width": 100, "height": 66, "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74_t.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/t\/", "media": "photo" },
  { "label": "Small", "width": "240", "height": "159", "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74_m.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/s\/", "media": "photo" },
  { "label": "Medium", "width": "500", "height": "331", "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/m\/", "media": "photo" },
  { "label": "Medium 640", "width": "640", "height": "424", "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74_z.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/z\/", "media": "photo" },
  { "label": "Large", "width": "1024", "height": "678", "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_500f8bbd74_b.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/l\/", "media": "photo" },
  { "label": "Original", "width": "1440", "height": "954", "source": "http:\/\/farm7.static.flickr.com\/6068\/6115633659_cdaca906e1_o.jpg", "url": "http:\/\/www.flickr.com\/photos\/b34u_h4r13y_n47h4n_7h0m45\/6115633659\/sizes\/o\/", "media": "photo" }
] }, "stat": "ok" })

Please help me escape from this horrible horrible guessing game.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:48:07+00:00Added an answer on May 25, 2026 at 10:48 am

    Use

    $.ajax({
        url: "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&format=json&api_key=708f179518b2093d23f0aef284b565a4&photo_id=6115633659&jsoncallback=?",
        type: "GET",
        cache: true,
        dataType: 'jsonp',
        success: function(data) {
    
            var sizelist = data.sizes.size;
            for (var i = 0; i < sizelist.length; i++) {
                if (sizelist[i].label == 'Original') largeSRC = sizelist[i].source;
            }
    
            alert(largeSRC);
    
        }
    });
    

    Demo at http://jsfiddle.net/NGr23/

    The problem is that size is an array. So you need to iterate over its elements to find the one with label of ‘Original’ ..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(function(){ $.ajax({ url:'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=user_name&callback=?', //dataType:'json', success:function(data){$('body').append('the data is' +data);} }); }); the above code with
Today I struggled with the following: $.ajax({url:'http://maps.google.com/maps/api/geocode/jsonaddress=Karachi&sensor=false&output=json&callback=?', dataType: 'json', success: function(data){ //eval((+data+)); alert(data); }
how to read the url http://api.twitter.com/1/statuses/21947795900469248/retweeted_by.json using ajax. I tried this but not working.
This is my code, $.ajax({ type:get, //this doesn't work //url:'http://example.com/json.php', //But this works url:'http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?',
Below is my code var tweetid = '133450847156838400'; $.ajax({ dataType: jsonp, url: http://api.twitter.com/1/statuses/show/+tweetid+.json?include_entities=1&callback=?, error:function(xhr,
Ext.Ajax.request({ url: 'http://bar.com/api/foos/', success: function(response, opts) { // How parse the response containing the
I have this jquery code: $.ajax({ type: GET, url: http://api.ipinfodb.com/v2/ip_query.php?key=3b80b5588c22d2a03c0e6979d1e85e397e043646c4a65ffe47ff01d47bce51e, dataType: xml, success: function(xml)
</html> <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script> <script> $.ajax({ type: 'GET', url: 'http://api.twitter.com/1/statuses/retweeted_to_me.json?&callback=?', success: function(data) { alert(data); },
$(document).ready(function(){ $.ajax({ url: http://gdata.youtube.com/feeds/api/users/zdf/playlists?v=2 , type: GET, success: function(msg){ console.log(msg); } }); }); i
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.