OCS presence in SharePoint AJAX-based web part
- by Maksym Ozerov
I'm currently implementing AJAX-based web part which displays search result. This search result has user names and opposite to each name I'm rendering the OCS presence indicator. This indicator works fine in IE6 but I can't get it to work in IE7/8.
Basically the problem in IE7/8 is that OCS is rendered but when you mouse over it nothing is shown. If you try to scroll page down then mouse over the OCS icon you will see the OCS actions menu in the bottom of the page instead of seeing it on the opposite to the user name.
My AJAX-based web part uses jQuery post method to make a request to the server and receives json which is then rendered to the div.
My HTML for the user name looks like this:
<nobr>
<span>
<a target='_blank' href='/ViewExpert.aspx?uid=4'>Some Expert</a>
<img height='1' width='3' border='0' alt='' src='/_layouts/images/blank.gif'><a class='ms-imnlink'
onclick='IMNImageOnClick();return false;' href='javascript:'>
<img height='12' width='12' border='0' id='3' ShowOfflinePawn='1' type='smtp' sip='[email protected]'
src='/_layouts/images/blank.gif' valign='middle' name='imnmark' alt='No presence information' title=''>
</a>
</span>
</nobr>
After the HTML above is rendered on the page I call the following two lines of code:
//have to reset this value, otherwise ProcessImn() fails after next AJAX request
imnCount = 0;
ProcessImn();
Any ideas why it doesn't work in IE7/8?