- Screen name: newbreedofgeek
newbreedofgeek's Profile
2 Posts
2 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 01-Mar-2012 01:03 AM
- Forum: Using jQuery
Hi there,I recently read this good example of using $.when and Deferred objects generated by $.get calls to Coordinate Coordinating multiple ajax requests (http://goo.gl/H7g4g)I tries this example and it works fine.But I have the need to be be able to use $.when to coordinate 'n' number of ajax calls, where 'n' can be maybe 50 or 100 calls.For e.g.:I will look through and make 100 ajax calls using $.get, and get a collection of the deferred objects and then use $.when to handle all the callbacks data when all 100 calls are complete.I tried doing this but it did not work (I also suspect this is wrong as when you .push into the deferredCollection array by calling getTweets the ajax call is already initiated and the response could have already come back before $.when is specified)- var deferredCollection = [];
- deferredCollection.push(getTweets('austintexasgov'));
- deferredCollection.push(getTweets('greenling_com'));
- deferredCollection.push(getTweets('themomandpops'));
- deferredCollection.push(getTweets('anotherUserA'));
- deferredCollection.push(getTweets('anotherUserB'));
- // I just make 5 ajax calls here, but what if I make around 100??
- $.when( deferredCollection
- ).done(function(Args){
- // there is an error here trying to access Args
- });
- var getTweets = function(user){
- var url='http://twitter.com/status/user_timeline/' + user + '.json';
- return $.get(url, {count:5}, null, 'jsonp');
- }
Can someone please give me some ideas on how to do this?Thanks in advance.- 27-Jan-2011 11:10 PM
- Forum: jQuery Mobile
Hi All,
After working on this for around a month I have released facebooktv.co which is a web app built completely on Jquery mobile.
I have to say, jQuery mobile is an amazing library and very stable even though it’s still only in Alpha 2 and I am keenly looking forward to the release version.
Facebooktv.co works perfectly on most computer browsers and the iphone and ipad, but I am having some difficulties on the android platform (but this is probably to do with some native styling issues I have and not jQuery mobile’s default styles).
So, please try the web app out here:
And if you guys have any technical questions to jQuery mobile, then you can DM or tweet me here
http://twitter.com/facebooktv_app
and If you have any recommendations or ideas for the web app then I’d love to hear from you, you can submit your ideas using the Google moderator page here:
http://www.google.com/moderator/#15/e=49220&t=49220.41
Please have a play around with the web app and let me know what you think :)
Cheers,
- «Prev
- Next »
Moderate user : newbreedofgeek