Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:10:13+00:00 2026-06-16T04:10:13+00:00

I’m using an ActiveXObject to handle lync status changes and show presence via the

  • 0

I’m using an ActiveXObject to handle lync status changes and show presence via the javascript below

var Instant = {

sipUri: "name@address.com", // Change this to the user's SIP URI you want to chat with
nameCtl: new ActiveXObject('Name.NameCtrl.1'),

onStatusChange: function (name, status, id) {
    alert(name + " " + status + " " +id);
},

showOOUI: function () {

var oouiX = 0, oouiY = 0;

oouiX += pawn_icon.offsetLeft + pawn_icon.clientLeft - pawn_icon.scrollLeft;
oouiY += pawn_icon.offsetTop + pawn_icon.clientTop - pawn_icon.scrollTop;

Instant.nameCtl.ShowOOUI(Instant.sipUri, 0, oouiX, oouiY);
},

hideOOUI: function () {
    Instant.nameCtl.HideOOUI();
}
}

And this html/javascript to actually register the event handler to the event:

<head>
    <title>Lync Presence Test</title>

    <!-- le JS -->
    <script type="text/javascript">
        if (Instant.nameCtl.PresenceEnabled) {
            Instant.nameCtl.OnStatusChange = Instant.onStatusChange;
            Instant.nameCtl.GetStatus(Instant.sipUri, "1");
        }
    </script>
</head>
<body>
<div id="presence" onmouseover="Instant.showOOUI()" onmouseout="Instant.hideOOUI()">Name<img id="pawn" name="pawn_icon"  src="Styles/images/LyncStatus/imnon.png" alt="Available"> </div>
</body>
</html>

As the title states, if I load the page, I get the event fires and I get the status code like one would expect. However, if I change my status, two events fire. The first contains the right status code and the second contains the old status code. The issue here is that I want to change to the new status, but the stale one is the last event to fire, so it overwrites the new change. The event also fires 6 times when I mouse over the person’s name.

Microsoft’s documentation of the Name.NameCtrl object is pretty sparse, but as I understand the getstatus method and onstatuschange property, they’re exactly what I’m looking for.

So, is there a reason that the statuschange event fires twice, and is there a way to either preempt this or switch the order of the events returned? Also, why does the event fire if you mouse over the name, as no status change has occurred? I’d like to find out more about the specific status change event, but I can’t find anything. I also don’t have access to the lync server, so I have to do client-side set up.

Name.NameCtrl documentation: http://msdn.microsoft.com/en-us/library/bb802706(v=office.14).aspx

Where I got the code for the presence functionality: http://blog.instant-tech.com/2012/05/web-client-for-microsoft-lync-2010.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:10:14+00:00Added an answer on June 16, 2026 at 4:10 am

    Many events fire; however, the alerts do not provide an accurate understanding of which event fired last. The events were firing in the right order. I just added a switch statement to the code to handle changing the picture bas

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Paperclip to handle profile photo uploads in my app. They upload
I am reading a book about Javascript and jQuery and using one of the
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a small JavaScript validation script that validates inputs based on Regex. I
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.