Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Those pesky quotation marks

$
0
0
I stared at what I had written for a bit, then realized, "Well, I've got the responseText, right?" So I eventually came up with this.

I had really liked my .final() clause, because it seemed to identify people for whom I had an email address but who are no longer in the system, so I didn't want to lose that warning, but I want to show user detail for any user who IS in the system. This seems to work:
            promiseEmail.fail(function() {
                hold = promiseEmail.responseText;
                var iIndex = hold.indexOf("Login=");
                if(iIndex == -1) alert("Whoops! Failed to retrieve logon from email: " + email);
                else {
                    var iEnd = hold.indexOf('"', iIndex+7);
                    var login = hold.substring(iIndex+7, iEnd);
                    get_user_profile_by_login(login)
                }
            });

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>