1. #1
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Leeds
    Posts
    47
    Vote Rating
    3
    damo is on a distinguished road

      0  

    Default ExtJS & YQL

    ExtJS & YQL


    Hi All,

    I've had a look on Google and haven't been able to find an example of this.

    Are you able to use a ScriptTagProxy to get data from YQL? It seems to not like the format of the JSON returned by YQL.

    Thanks for any help,
    Damo

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Does nobody even glance at documentation nowadays?

    Just this morning: http://www.extjs.com/forum/showthread.php?t=96625

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Leeds
    Posts
    47
    Vote Rating
    3
    damo is on a distinguished road

      0  

    Default


    Yes I have and I also have been searching the forums and Google for the last hour with no luck.

    I'm not using XML the response is json wrapped in a callback.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    What does the response look like?

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Leeds
    Posts
    47
    Vote Rating
    3
    damo is on a distinguished road

      0  

    Default


    This is the response from YQL, I'm sure I'm probably missing something stupidly obvious!

    HTML Code:
    cbfunc({
     "query": {
      "count": "15",
      "created": "2010-04-09T11:58:21Z",
      "lang": "en-US",
      "updated": "2010-04-09T11:58:21Z",
      "uri": "http://query.yahooapis.com/v1/yql?q=select+*+from+html+where+url%3D%27http%3A%2F%2Fwww.multimap.com%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26client%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD%27+and+xpath+%3D+%27%2Fhtml%2Fbody%2Fdiv%2Fdiv%5B3%5D%2Fdiv%5B2%5D%2Ftable%5B3%5D%2Ftbody%2Ftr%2Ftd%2Ffont%2Fa%27",
      "results": {
       "a": [
        {
         "href": "browse.cgi?client=halifax&lon=-1.662719&lat=53.795927&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=631&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Pudsey Market Place"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.626432&lat=53.811827&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1253&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bramley (west Yorkshire)"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.641419&lat=53.837066&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=602&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Horsforth"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.578730&lat=53.820900&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=597&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Headingley 5 North Lane"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.752917&lat=53.794591&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1251&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bradford Bank Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.754315&lat=53.794450&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1252&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bradford Kirkgate"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.602215&lat=53.745337&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=620&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Morley Windsor Court"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.574226&lat=53.758651&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=615&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "White Rose Centre"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.660444&lat=53.731755&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=70&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - Birstall Insurance\n                  Services"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.621467&lat=53.858998&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=184&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - J Michael Jepson\n                  & Partners"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.545192&lat=53.799665&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=612&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds Headrow"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.544156&lat=53.797252&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=610&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds Commercial Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.541055&lat=53.797600&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=613&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds King Edward Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.683338&lat=53.866224&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=656&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Yeadon"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.785889&lat=53.779734&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=19&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - Serena\n                  Estates"
        }
       ]
      }
     }
    });
    Thanks for looking at this.
    Damo

  6. #6
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Leeds
    Posts
    47
    Vote Rating
    3
    damo is on a distinguished road

      0  

    Default


    Solved it, I didn't think I was able to do query.results.a as the root node but obviously you can ;-)

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Well pasting this into Firebug worked:

    Code:
    function cbfunc(o) {
        console.log(o);
    }
    cbfunc({
     "query": {
      "count": "15",
      "created": "2010-04-09T11:58:21Z",
      "lang": "en-US",
      "updated": "2010-04-09T11:58:21Z",
      "uri": "http://query.yahooapis.com/v1/yql?q=select+*+from+html+where+url%3D%27http%3A%2F%2Fwww.multimap.com%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26client%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD%27+and+xpath+%3D+%27%2Fhtml%2Fbody%2Fdiv%2Fdiv%5B3%5D%2Fdiv%5B2%5D%2Ftable%5B3%5D%2Ftbody%2Ftr%2Ftd%2Ffont%2Fa%27",
      "results": {
       "a": [
        {
         "href": "browse.cgi?client=halifax&lon=-1.662719&lat=53.795927&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=631&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Pudsey Market Place"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.626432&lat=53.811827&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1253&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bramley (west Yorkshire)"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.641419&lat=53.837066&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=602&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Horsforth"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.578730&lat=53.820900&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=597&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Headingley 5 North Lane"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.752917&lat=53.794591&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1251&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bradford Bank Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.754315&lat=53.794450&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=1252&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Bradford Kirkgate"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.602215&lat=53.745337&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=620&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Morley Windsor Court"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.574226&lat=53.758651&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=615&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "White Rose Centre"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.660444&lat=53.731755&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=70&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - Birstall Insurance\n                  Services"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.621467&lat=53.858998&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=184&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - J Michael Jepson\n                  & Partners"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.545192&lat=53.799665&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=612&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds Headrow"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.544156&lat=53.797252&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=610&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds Commercial Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.541055&lat=53.797600&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=613&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Leeds King Edward Street"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.683338&lat=53.866224&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=656&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "Yeadon"
        },
        {
         "href": "browse.cgi?client=halifax&lon=-1.785889&lat=53.779734&scale=10000&width=400&height=300&rt=browse2&reclimit=1&f_id=19&browse_url=%2Fclients%2Fbrowse.cgi%3Fclient%3Dhalifax%26addr2%3D%26types%3D%26db%3DGB%26reclimit%3D15%26addr3%3D%26pc%3DLS287DD",
         "strong": "The Halifax Agent - Serena\n                  Estates"
        }
       ]
      }
     }
    });
    And I examined the resulting object, so it's what that object is being passed to that's choking. Set a breakpoint in whatever consumes that.

  8. #8
    Sencha User rajzshkr's Avatar
    Join Date
    Feb 2012
    Location
    Chennai
    Posts
    5
    Vote Rating
    -1
    rajzshkr is an unknown quantity at this point

      -1  

    Default


    var urlss = "http://query.yahooapis.com/v1/public/yql?q=select%20title%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22&format=json";
    Ext.define('AM.store.Users', {
    extend: 'Ext.data.Store',
    model: 'AM.model.User',
    autoLoad: true,

    proxy: {
    type: 'scripttag',
    url : urlss,

    reader:{
    type: 'json',
    root: 'query.results.item'
    }
    }


    });

    Try this. this will help out you.

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar