This project has moved and is read-only. For the latest updates, please go here.

SPServices is null or not an object

Jan 18, 2011 at 1:30 PM

Can anyone see what may be wrong with this script? I know my links are linked correctly because I can copy the URL and paste it and it opens the JS file. I cann't figure what I am missing. I also tried putting an alert inside the ready function and that also works fine, however I keep getting the error message SPServices is null or not an object. 

<script language="javascript" type="text/javascript" src="https://sharepoint/Global%20Documents/Information%20Technology/JavaScript/jquery-1.4.4.js"></script>
<script language="javascript" type="text/javascript" src="https://sharepoint/Global%20Documents/Information%20Technology/JavaScript/jquery.SPServices-0.5.8.min.js"></script>
<script language="javascript" type="text/javascript">

 $(document).ready(function() {
   relationshipList: "Category",
   relationshipListParentColumn: "RequestType",
   relationshipListChildColumn: "Title",
   parentColumn: "RequestType",
   childColumn: "Category",
   debug: true


Jan 18, 2011 at 2:08 PM

Hi S10,

Everything does look OK.You're only getting a problem on the SPServices call... Perhaps there's a problem in the jquery.SPServices-0.5.8.min.js file? Try re-downloading it and uploading to your Doc Library again (delete old version first or copy over the top).

hth, Alex

Jan 18, 2011 at 3:24 PM

Believe it or not i've tried that, also tried the full version, and different versions. All yeild the same result.. On one of my other sites this works fine. What else can I do to troubleshoot this?

Jan 18, 2011 at 3:40 PM

What's even more weird is that it worked on the editform, but getting the error on the newform.

Jan 19, 2011 at 4:30 AM

The only thing I can spot is the https on your URLs. You might want to try making them relative URLs instead of absolute ones and see if that helps.

The only always valid test of the script reference is to open them in the context of the page. Opening them in the browser doesn't guarantee that they can be opened in the page context.


Jan 24, 2011 at 12:43 PM

I changed them to relative fields and linked still didn't change anything. The editform.aspx works fine so I copied and pasted it directly from there into a newform.aspx.

Can other code be messing up with it?

Jan 24, 2011 at 1:02 PM

I combined all the rest of my scripts into one and it started working... must have had something incorrectly typed in the other code.

Jan 24, 2011 at 1:17 PM

Glad you got it working!