jquery - spservices raising an error as soon as I try to use functions -
i'm trying use spservices current user accesses page. problem there "syntax error, unrecognized expression" when try that.
the code throws error is:
var thisuseraccount = $().spservices.spgetcurrentuser({ fieldname: "name", debug: false });
the same error occurs when following
alert($().spservices.spgetcurrentuser());
i'm using: jquery.spservices-2014.01.min
when use developer tools ie , put in watchpoints see spservices exists , spgetcurrentuser exists. if use:
alert($().spservices.spgetcurrentuser);
i whole prototype spgetcurrentuser printed alert.
so not undefined. question though doing wrong there can't use function (the error message shows nothing else aside unrecognized expression , doesnt go details expression in question is).
edit: small detail var thissite = $().spservices.spgetcurrentsite(); works in not throw errors when use alert(thissite) shows empty string.
and bit of testing around saw that:
var lastid = $().spservices.spgetlastitemid({ listname: "mylistname" });
throws same error spgetcurrentuser (at least if give no useraccount data.....if useraccount data given no error thrown).
Comments
Post a Comment