[Facebooker-talk] autocompletion inside facebook?
Mike Mangino
mmangino at elevatedrails.com
Wed Jan 21 12:47:04 EST 2009
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
More information about the Facebooker-talk
mailing list