I have a custom web part which is generating some user data. I have added the appropriate code to output the standard presence icon and menu however this is acting rather stangely.
The rendered html of my web part is as follows:
<span>
<a href="http://mysite/Person.aspx?accountname=USERID">USERNAME</a>&nbsp;
<img border="0" height="12" width="12" src="/_layouts/images/blank.gif" onload="IMNRC('USEREMAIL')" id="imnUSERID" ShowOfflinePawn="1" />
</span>
Obviously replacing USERID, USERNAME, USEREMAIL etc.
The problems are twofold.
1) In IE7 the presence information does not get retrieved. The menu displays correctly but the icon does not appear and when you hover over the gap the drop down menu does not provide IM settings.
2) In IE8 RC1 the presence information comes back correctly and the icon displays, but the drop down list is rendered severeal inches above the icon. (see this screenshot)
Any help with these issues, or with other tips about adding presence to custom web parts would be greatfully received.
Update on progress
*- Adding web page to 'Trusted Sites' for IE7 - did nothing - Compatability view for IE8 makes no difference. - Changed to id="CSRP_id,type=sip" Changed code to the following on recommendation:*
<span>
<img class="PresenceImage" src="/_layouts/images/imnhdr.gif" onload="IMNRC('USEREMAIL')" name="imnmark" ShowOfflinePawn="1" id="contact_im,type=sip" />
</span>
None of the above updates have been succesful.