chandler's blog - MOSS SharePoint 2007, Office 2007, Windows Server 2003 RSS 2.0
 Tuesday, 08 December 2009
If you need the SharePoint DisplayName ("Lastname, FirstName") within a CQWP or for example for a jquery WebService
to filter list items, you can use the following JS function:

Javascript Function:

function getCurrentUser()
{
 var temp= document.getElementsByTagName('a');

 for (var i=0; i < temp.length; i++)
 {
     if(temp[i].innerText.substr(0,7) == 'Welcome')
     {
         return temp[i].innerText.substr(8,temp[i].innerText.length);
     }
 }
}

Tuesday, 08 December 2009 13:18:51 (W. Europe Standard Time, UTC+01:00)  #    -
General | SharePoint
About the author
DI(FH) Handler Christian

DI(FH) Handler Christian
Graz, Austria


SharePoint Consultant &
Information Manager

© Copyright 2017
Categories
Archive
<2009 December>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
Blogroll
Statistics
Total Posts: 19
This Year: 0
This Month: 0
This Week: 0
Comments: 59

Sign In
All Content © 2017, DI(FH) Handler Christian
Graz, Austria