Thanks a lot.  Here is what I have and I'm getting an "undefined"
value back and I notice in firebug there is no value coming across.
Here is my code:

Server Side:

 Ape.registerCmd('getuserlist', true, function(params, infos) {
   var chan = Ape.getChannelByName('testChannel');
   infos.sendResponse('userlist',{'theuserlist':chan.userlist});
});

Client Side:

function whosonline()
{
    client.core.request.send('getuserlist');
}

client.onRaw('userlist', function(params) {
                console.log(params);
                //alert(params.data.FirstName);
                //var userlist = params.data.getuserlist;
                document.getElementById("whosonline").innerHTML =
unescape(params.data.userlist);
                });



On Jan 24, 11:17 am, Adilson Carvalho <[email protected]>
wrote:
> In this snippet I've created a command on the server that lists all users on
> the channel back to the usert that asked for it.
>
> On the client side you must register a command handler to draw the data
> inside the div you want.
>
> Ape.registerCmd('getuserlist', true, function(params, infos) {
>    var chan = Ape.getChannelByName('yourChannel');
>    infos.sendResponse('userlist', chan.userslist);
>
> });
>
> Here to 'debug' I use a lot JSON.stringify(object) and the debug plugin (you
> can find it athttp://more.ape-project.org/app/2-debug.html)
>
> Cordialmente,
>
> Adilson Carvalho
>
> ---
> Vida?! Não, é intervalo de superfície. Vida mesmo, só debaixo d'água.
>
> Tá de bobeira? Venha conhecer o meu blog emhttp://adilsoncarvalho.com.br/blog/
>
> 2011/1/24 crusherdestroyer <[email protected]>
>
> > Hi.  Thank you for the quick reply.  Can you give me an example?
>
> > On Jan 24, 10:54 am, Adilson Carvalho <[email protected]>
> > wrote:
> > > I tried that too.
>
> > > What I was able to do was to list all users on a channel using
> > > channel.userlist.
>
> > > Cordialmente,
>
> > > Adilson Carvalho
>
> > > ---
> > > Vida?! Não, é intervalo de superfície. Vida mesmo, só debaixo d'água.
>
> > > Tá de bobeira? Venha conhecer o meu blog emhttp://
> > adilsoncarvalho.com.br/blog/
>
> > > 2011/1/24 crusherdestroyer <[email protected]>
>
> > > > Hi.  I just want to populate a div with the current userlist when
> > > > someone joins a channel.  I have been reading through the
> > > > documentation and just can't figure it out.  If someone would give me
> > > > the server side and client side code to get me started or point me in
> > > > the right direction, that would be great.  Any help would be greatly
> > > > appreciated.  Thank you!
>
> > > > Ryan
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "APE Project" group.
> > > > To post to this group, send email to [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<ape-project%[email protected]>
> > <ape-project%[email protected]<ape-project%[email protected]>
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/ape-project?hl=en
> > > > ---
> > > > APE Project (Ajax Push Engine)
> > > > Official website :http://www.ape-project.org/
> > > > Git Hub :http://github.com/APE-Project/
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "APE Project" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<ape-project%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/ape-project?hl=en
> > ---
> > APE Project (Ajax Push Engine)
> > Official website :http://www.ape-project.org/
> > Git Hub :http://github.com/APE-Project/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to