How to Get all users from Office Communicator to asp.net web page?

Viewed 2572

I am facing a serious problem. I want to display all users and their status in a HTML Table .Is it possible to do using javascript ?

I have gone through the below link where it is showing only one user and it's status and user mail id is hard coded.

Integrate Microsoft Office Communicator 2007 in ASP.NET Page

Javascript

<script type="Javascript">

     var sipUri = "your.contact@your.domain.com";

     var nameCtrl = new ActiveXObject('Name.NameCtrl.1');
     if (nameCtrl.PresenceEnabled)
     {
        nameCtrl.OnStatusChange = onStatusChange;
        nameCtrl.GetStatus(sipUri, "1");
     }


     function onStatusChange(name, status, id)
     {
        // This function is fired when the contacts presence status changes.
        // In a real world solution, you would want to update an image to reflect the users presence
           alert(name + ", " + status + ", " + id);
     }

     function ShowOOUI()
     {
           nameCtrl.ShowOOUI(sipUri, 0, 15, 15);
     }

     function HideOOUI()
     {
           nameCtrl.HideOOUI();
     }

 </script>

HTML

 <span onmouseover="ShowOOUI()" onmouseout="HideOOUI()" style="border-style:solid">Your Contact</span>
 <table id="tblContacts" runat="server">
    <tr>
       <td> email id </td>
       <td> status </td>
    </tr>
    <tr>
       <td> --- </td>
       <td> --- </td>
    </tr>
    <tr>
       <td> --- </td>
       <td> --- </td>
    </tr>
    <tr>
       <td> --- </td>
       <td> --- </td>
    </tr>
 </table>

Here in this example it is showing for a single user and user mail id is defined as a string(hard coded). i want to show all users. Is it possible through javascript ?

Any solution/Demo will be very much helpful for me.

Thanks.

2 Answers
Related