Hi Viswanath, I get your query now. I don't have any code which would give you exactly the orkut kind of functionality. But if I can point you to a some javascript code which allows you to show an auto complete text box. Here you can provide a functionality, when the user starts typing your relevant friends names starts appearing. You can refer the site - http://www.codeproject.com/KB/scripting/jsactb.aspx
Also note, this is more of a DHTML magic or Ajax problem, then a OpenSocial problem, hence we do not have a complete code snippet to help you here. Best, Rohit Google Developer Programs Join us at Google's biggest developer event of the year May 28-29, San Francisco http://code.google.com/events/io On Mon, Jun 2, 2008 at 11:17 PM, viswanath vellaiappan < [EMAIL PROTECTED]> wrote: > Hello Rohit, > Thanks for your help, but this is not what I expected. The example which > you have given just lists all the friends (default 20) of the viewer. But > what I wanted is to display the relevent users name dynamically upon search > of some text. Which orkut offers in home page. > Hope you got it! > > > Thanks, > Viswanath Vellaiappan > > On Tue, Jun 3, 2008 at 11:22 AM, Rohit Ghatol <[EMAIL PROTECTED]> > wrote: > >> >> Hi Viswanath, >> Luckily there is already an example for the same in the developers >> guide section. I would any ways paste the same example below >> >> Incase, the following example is not a good enough help for you, >> please get back to me with more specific queries - >> >> Developer's Guide - >> http://code.google.com/apis/opensocial/docs/0.7/devguide.html >> >> Example snippet - >> <?xml version="1.0" encoding="UTF-8" ?> >> <Module> >> <ModulePrefs title="List Friends Example"> >> <Require feature="opensocial-0.7"/> >> </ModulePrefs> >> <Content type="html"> >> >> <![CDATA[ >> >> <script type="text/javascript"> >> >> /** >> * Request for friend information. >> */ >> function getData() { >> var req = opensocial.newDataRequest(); >> >> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), >> 'viewer'); >> >> >> req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS), >> 'viewerFriends'); >> req.send(onLoadFriends); >> }; >> >> /** >> * Parses the response to the friend information request and >> generates >> * html to list the friends along with their display name. >> * >> * @param {Object} dataResponse Friend information that was >> requested. >> */ >> function onLoadFriends(dataResponse) { >> var viewer = dataResponse.get('viewer').getData(); >> var html = 'Friends of ' + viewer.getDisplayName(); >> html += ':<br><ul>'; >> var viewerFriends = dataResponse.get('viewerFriends').getData(); >> viewerFriends.each(function(person) { >> html += '<li>' + person.getDisplayName() + '</li>'; >> }); >> html += '</ul>'; >> document.getElementById('message').innerHTML = html; >> }; >> >> gadgets.util.registerOnLoadHandler(getData); >> >> </script> >> <div id="message"> </div> >> ]]> >> </Content> >> </Module> >> >> Thanks, >> Rohit >> >> On May 25, 11:42 am, viswanath vellaiappan >> <[EMAIL PROTECTED]> wrote: >> > Hello Everybody! >> > I would like to develop and app in orkut which needs to >> > search for the friends and select one among them. It would be great if >> > it is very similar to what orkut provides in the home page >> > (dynamically list top 10 results). I would be glad if you could help >> > me! >> > >> > Thanks, >> > Viswanath Vellaiappan >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---