For a directory, I'm attempting to retrieve names and data beginning with their email address. Two addresses--both with single quotes--elude me. I've tried everything I can think of, but nothing has worked. Any ideas?
...
var arFolks = ["O'KeeffePM@some.org", "O'DonoghueDW@some.org"];
...
for(var l=0; l<arFolks.length; l++) {
strUser = arFolks[l];
getLoginFromEmail(strUser);
}
...
function getLoginFromEmail(email) {
// var whatever = email.replace(/'/g,"\'"); //nothing tried here has helped
...
var promiseEmail = $().SPServices({
operation: "GetUserLoginFromEmail",
emailXml: "<Users><User Email=" + email + " /></Users>"
});
promiseEmail.done(function() {
...
});
promiseEmail.fail(function() {
alert("Whoops! Failed to retrieve logon from email: " + email);
});
}