I call the function like this:
mailtolink variable represents a valid
mailto: link. The problem is, that in IE11 (also in IE8 compatibility mode), the mail body ends only with
However in Chrome, I get all the details I need:
I made the mail body shorter, to make sure it is not the lenght, but I got the same results. Can someone give me a hint how to make the script work in IE?
_spPageContextInfo.userLoginNamethis variable provided by SharePoint and you can use that to get Login name.
onQuerySucceededmethod is empty. That's where you get
currentUser.get_loginName(). If you could console this in browser developer tool. You might figure what's wrong there.
_spPageContextInfo.userLoginNameis only available since Sharepoint 2013, so that's not an option for me. The
onQuerySucceededmethod is empty, because I update the
currentUserobject in the line
currentUser = this.oWeb.get_currentUser();If I put an alert in
onQuerySucceededI get the popup with the correct userid.
onQuerySucceededthen your code is correct. Just need to update the flow. As far as my knowledge your execution is taking time and your HTML is already rendered by that time, So I would suggest you to have any DOM element and in your
onQuerySucceededmethod, you should update
innerHTMLof that element.