My JavaScript skills are pretty rusty Marc, so I've been slowly debugging SharePoint 2010 in IE9. The error I encounter (returned from the Sizzle library) seems to be where the "find" attempts to scrape the field value (Name) from the userdisp.aspx page.
2293: $(thisUserDisp.responseText).find("table.ms-formtable td[id^='SPField']").each(function() {
Here are the versions of jquery and SPServices I am referencing.
jquery-1.9.0.js
jquery.SPServices-2013.02a.js
I believe my simple alert code is correct, because if I request the fieldName: "ID" I get a value of "2" returned and the other functions work fine.
var userName = "";
$(document).ready(function() {
alert("jQuery");
alert($().SPServices.SPGetCurrentSite());
userName = $().SPServices.SPGetCurrentUser({fieldName: "Name"});
alert("userName: " + userName);
});
Here's the error...and the first part of the return (which appears to be the entire page that was passed to the find to be scraped):
...................................
SCRIPT5022: Syntax error, unrecognized expression: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr">
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>
Any words of wisdom or something simple I may have missed?
Thanks...Russ
2293: $(thisUserDisp.responseText).find("table.ms-formtable td[id^='SPField']").each(function() {
Here are the versions of jquery and SPServices I am referencing.
jquery-1.9.0.js
jquery.SPServices-2013.02a.js
I believe my simple alert code is correct, because if I request the fieldName: "ID" I get a value of "2" returned and the other functions work fine.
var userName = "";
$(document).ready(function() {
alert("jQuery");
alert($().SPServices.SPGetCurrentSite());
userName = $().SPServices.SPGetCurrentUser({fieldName: "Name"});
alert("userName: " + userName);
});
Here's the error...and the first part of the return (which appears to be the entire page that was passed to the find to be scraped):
...................................
SCRIPT5022: Syntax error, unrecognized expression: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr">
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>
Personal Settings
...............................Any words of wisdom or something simple I may have missed?
Thanks...Russ