Loading...

RE: qListView and Lync Presence Indicator Question

RE: qListView and Lync Presence Indicator Question

#7084
Anonymous
Anonymous
Participant

Hi Novafix,

n

 

n

I think because you are putting the same ‘ID’ value into the script. You may noticed that this script is suing the “QAIMID<%ID%>” as the ID property, if you put two web parts into one page, the <%ID%> may be the same.

n

I would like to wrap this script as a JavaScript to generate the ID property value. Please try the below steps:

n

    n

  1. Add a HTML From Web Part into the page;
  2. n

  3. Click the “Source Editor…” in the edit mode.
  4. n

  5. Put the below script into the Text Editor and save:
  6. n

n

<script>

n

function createMailField(mail,displayField){

n

return "<span><img onload=\"IMNRC('"+mail+"')\" id=\"QAIMID"+(1+Math.random()*10000).toString(16)+"\" name=\"imnmark"+(1+Math.random()*10000).toString(16)+"\" ShowofflinePawn = \"1\" border=\"0\" height=\"12\" valign=\"middle\" class=\"presenceIndicator\" src=\"/_layouts/images/imnhdr.gif\"/><a href=\"mailto:"+mail+"\"></a>"+displayField+"<span>";

n

}

n

</script>

n

        4. Edit the Custom field in the qListView,put the below code into the “Calculated Value”:

n

<script>createMailField('<%Mail%>','<%People%>')</script>

n

        5. Save all.

n

 

n

 Now two web parts should work in the same page.

n

 

n