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

SPCascadeDropdowns: no child list items are selected

Dec 30, 2010 at 6:23 PM

I set up a cascading dropdown, but I have no child items in the second dropdown. 

I know that my .js references are OK (tested with an alert) and I can see that SPCascadeDropdowns has added the text "Choose Subcategory" in my second dropdown.  So I know its included and firing, but can't figure out why no items are selected.

I have had it working with SharePoint Cascaded Lookups ( ) but wanted to use SPServices instead (wanted to familiarize myself with jquery as well, for use in other lists).

List "Category" has one column, "Title" (internal name Title).

List "Subcategory has two columns, "Title" (internal name Title) and "Category" (internal name Category; it is a lookup to the "Category" list).

List "Tickets" has two lookup columns, "Category" (internal name Category0) and "Subcategory" (internal name Subcategory) 

I put my .js references in a ContentPlaceHolder, which refers to the <HEAD> section in my site master page.

I also tried putting the references in my CEWP, but the result was the same.

And have tried the uncompressed and compressed versions.

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script language="javascript" type="text/javascript" src="http://mysite/js/jquery-1.4.4.js"></script>
<script language="javascript" type="text/javascript" src="http://mysite/js/jquery.SPServices-0.5.8.js"></script>

<SCRIPT type="text/javascript"  >
   relationshipList: "Subcategory",
   relationshipListParentColumn: "Category",
   relationshipListChildColumn: "Title",
   parentColumn: "Category",
   childColumn: "Subcategory",
   debug: true



 Any thoughts?  I'm debugging with Firebug, but I am a relative newcomer to js and have not made much progress.  I can see the jquery scripts in the debugger, but haven't been able to step into them.

Dec 30, 2010 at 6:53 PM

Tried the debugger again, and it works better when the .js references are in the CEWP : )

Was able to see the call to GetListItems and all looks OK at that point, I think

CAMLQuery "<Query><OrderBy><FieldRef Name='Title'/></OrderBy><Where><Eq><FieldRef Name='Category'/><Value Type='Text'>Dictation</Value></Eq></Where></Query>"
CAMLRowLimit 0
CAMLViewFields "<ViewFields><FieldRef Name='Category' /><FieldRef Name='Title' /></ViewFields>"
async - false
listName "Subcategory"
operation "GetListItems"
webURL ""

But I can't catch the result of the query, and afterwards there is a message on the bottom of the debug window: POST http://mysite/_vti_bin/Lists.asmx 401 unauthorized

Is the problem that I am not authorized to use the Lists service?  I can run a CAML query on the Subcategory list via U2U's CAML Builder...

Dec 30, 2010 at 7:03 PM

Made a new custom list ("Subcat") and it works fine.  I would really rather not enter the dozens of subcategories again, so if you have any ideas about why the first subcategory list failed, I would appreciate it!  Glad the Cascading dropdown is working though, and happy to have made a little progress with firebug.

Dec 30, 2010 at 11:32 PM

A couple of things I would check is if the title of the list is spelled correctly or at least what SharePoint thinks it is. Just a guess on that one. Another thing to be sure is sometimes I have to use the weburl parameter to get things to work. Have you tried adding that as well?

Jan 3, 2011 at 1:44 PM

Sorry for the delay in responded to this; I was sick over the holidays and got very backed up.

I sometimes see 401s prior to 200s in network topologies where the authentication is more complex. The 401 in itself may not be an issue.

As Daniel points out above, spelling is so often the problem! You've been debugging enought, though, that you probably would have caught that by now.

In any case, this sounds like it ought to work. Post back with more details if you are still having problems and we'll get it sorted.


Jan 4, 2011 at 4:55 PM

And I am sorry to bother you with what turned out to be a silly mistake!  Somehow, in my relationshiplist, there were no longer any categories associated with the subcategories (although I am very sure that the category field in the relationship list WAS populated at some point).  I am not sure how that happened; wonder if it could have been that I changed a column name in the category list?  Mad that I spent time trying to "fix" it, but glad that I had a chance to step through some of the code - I am not all that comfortable with javascript, and the improved debugging tools in VS2010 are really helpful for those of us getting started.


Hope you are feeling better - I always seem to get sick over the holidays, too.  Too much activity, not enough sleep!