Hi, I just finished the book from Mike Mangino. It looks like the ability to use ?high level javascript? inside the canvas is quite hard. FBJS is painful for developers I think. I?m trying to have a simple autocompletion for a text field in my app. Was someone able to use this: http://wiki.developers.facebook.com/index.php/FBJS/Examples/Typeahead/AJAX ? The ajax call is well done on my server but nothing happens client side (no error neither). Does someone have another solution to implement basic autocompletions inside Facebook? I don?t especially want to use Facebook?s one. Most packages of course use Prototype or jQuery. Thanks! Aur?lien
Thanks Zhao, I should have said I was trying to do an AJAX autocompletion. Your solution should work but what if I have 1000 items to search or more? I cannot include all searchable items into the FBML, isn''t it? Aur?lien On 21 Jan 2009, at 18:04, Zhao Lu wrote:> Aurelien, > > I have implemented typeahead in my facebook app without much > difficulty: > > <fb:fbml version="1.1"> > <fb:typeahead-input name="contact_search" > autocomplete="off" onselect="updateAccountOptions()"> > <% current_user.contacts.each do |contact| %> > <% id = contact.id %> > <% fullname = contact.name %> > <fb:typeahead-option value="<%= id %>"><%= > fullname %></fb:typeahead-option> > <% end %> > </fb:typeahead-input> > </fb:fbml> > > The typeahead is used to suggest the contacts of the current user. > > Zhao > > On Wed, Jan 21, 2009 at 4:30 AM, Malisart Aur?lien <aurelien.malisart.mailinglists at gmail.com > > wrote: > Hi, I just finished the book from Mike Mangino. > It looks like the ability to use "high level javascript" inside the > canvas is quite hard. FBJS is painful for developers I think. > > I''m trying to have a simple autocompletion for a text field in my > app. Was someone able to use this: > http://wiki.developers.facebook.com/index.php/FBJS/Examples/Typeahead/AJAX > ? > The ajax call is well done on my server but nothing happens client > side (no error neither). > > Does someone have another solution to implement basic > autocompletions inside Facebook? I don''t especially want to use > Facebook''s one. Most packages of course use Prototype or jQuery. > > Thanks! > > Aur?lien > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > Zhao-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090121/8706b8bf/attachment.html>
There''s a typeahead helper in the facebook form builder, but it doesn''t do ajax. I would try this solution first though. Depending upon the size of the items, 1000 items is only about 10k. It might not be that bad. Mike On Jan 21, 2009, at 12:20 PM, Malisart Aur?lien wrote:> Thanks Zhao, > > I should have said I was trying to do an AJAX autocompletion. > > Your solution should work but what if I have 1000 items to search or > more? > I cannot include all searchable items into the FBML, isn''t it? > > Aur?lien > > On 21 Jan 2009, at 18:04, Zhao Lu wrote: > >> Aurelien, >> >> I have implemented typeahead in my facebook app without much >> difficulty: >> >> <fb:fbml version="1.1"> >> <fb:typeahead-input name="contact_search" >> autocomplete="off" onselect="updateAccountOptions()"> >> <% current_user.contacts.each do |contact| %> >> <% id = contact.id %> >> <% fullname = contact.name %> >> <fb:typeahead-option value="<%= id %>"><%= >> fullname %></fb:typeahead-option> >> <% end %> >> </fb:typeahead-input> >> </fb:fbml> >> >> The typeahead is used to suggest the contacts of the current user. >> >> Zhao >> >> On Wed, Jan 21, 2009 at 4:30 AM, Malisart Aur?lien <aurelien.malisart.mailinglists at gmail.com >> > wrote: >> Hi, I just finished the book from Mike Mangino. >> It looks like the ability to use "high level javascript" inside the >> canvas is quite hard. FBJS is painful for developers I think. >> >> I''m trying to have a simple autocompletion for a text field in my >> app. Was someone able to use this: >> http://wiki.developers.facebook.com/index.php/FBJS/Examples/Typeahead/AJAX >> ? >> The ajax call is well done on my server but nothing happens client >> side (no error neither). >> >> Does someone have another solution to implement basic >> autocompletions inside Facebook? I don''t especially want to use >> Facebook''s one. Most packages of course use Prototype or jQuery. >> >> Thanks! >> >> Aur?lien >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> >> -- >> Zhao > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
On 21 Jan 2009, at 18:47, Mike Mangino wrote:> There''s a typeahead helper in the facebook form builder, but it > doesn''t do ajax. I would try this solution first though. Depending > upon the size of the items, 1000 items is only about 10k. It might > not be that bad.Yes indeed... I''ll try to see if this number is borned or not in practice for my actual case. Thanks.