Skip to main content
5 events
when toggle format what by license comment
Jan 26, 2016 at 16:16 comment added vapcguy I since found out, you could do the SPServices call, but they don't have "Name" as a field - there is "FirstName" and "LastName", and you'd have to do some concatenation: var thisUsersValues = $().SPServices.SPGetCurrentUser({ fieldNames: ["FirstName", "LastName"], debug: false }); var name = thisUsersValues.FirstName + ' ' + thisUsersValues.LastName; Then you would still use .html(name) to add it in.
Dec 29, 2015 at 22:45 comment added vapcguy Yeah, they've modified that ID to be different in all the SP versions, I stopped keeping up with them. Glad you found the right ID. In 2013, they stopped putting "Welcome" beside the logged-in user's name.
Dec 23, 2015 at 16:27 vote accept bgmCoder
Dec 23, 2015 at 16:06 comment added bgmCoder I think you are right; it was the spservices call fetching the username that must have been invalidating the page. I replaced it with your function and it worked. Nota Bene, though, for 2010, I fetched the user value with this instead: $('[id*="zz17_Menu"] span').text(); and didn't have to use split on welcomeText. But it worked! I am astounded. But you can also fetch the username without spservices like this: sharepoint.stackexchange.com/a/53516/7452
Dec 21, 2015 at 16:48 history answered vapcguy CC BY-SA 3.0