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

Cannot create cascading dropdown.

Oct 15, 2009 at 8:35 PM



I am using this jquery.

<script language="javascript" type="text/javascript" src="/Documents/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="/Documents/jquery.SPServices-0.3.1.min.js"></script>

<script language="javascript" type="text/javascript">
 $(document).ready(function() {
   relationshipList: "Test List2",
   relationshipListParentColumn: "Supplier",
   relationshipListChildColumn: "Title",
   parentColumn: "Supplier",
   childColumn: "Vendor"


Test List1 - Title, Supplier

Test List2 - Title and Supplier (Look up from Test List1)

Test List3 - Title, Supplier (Look up from Test List1), Vendor (Look up from Test List2)

But i cannot get the cascading dropdown list.

What could be the problem? 


Thank you


Oct 15, 2009 at 8:54 PM


At first glance, everything looks OK.  Is your relationshipList in the same site as your form?  If not, you should specify the WebURL where it sits.  Also, what, if any, errors do you get?


Oct 15, 2009 at 9:57 PM


I figured out.

I placed .js file in a library of same site instead of root of site collection.

Now its working fine.

Thanks for reply.


Oct 15, 2009 at 10:05 PM

Glad you worked it out. Let me know if there is anything else I can
help with.

Oct 26, 2009 at 9:04 PM


Where did you place your jquery code?

I can figuare out where to place the code on the NewForm.aspx page (if that is where it is suppose to be anyway). In SPD, when i post the code near the top, The first three lines are underlined in red and say "in content pages, content is not allowed outside <script> or <asp:Content> regions."




Oct 26, 2009 at 9:12 PM


I generally put my script in the PlaceHolderMain ContentPlaceHolder, like this:

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" language="javascript" src="/jQuery%20Libraries/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript" src="/jQuery%20Libraries/jquery.SPServices-0.4.1.min.js"></script>
<script type="text/javascript">
    $(document).ready(function() { something...

Obviously, the src attributes should point to wherever you've put the .js files.

Hope this helps.  Let me know if you have further questions.


Oct 26, 2009 at 9:27 PM


I put the files in a library under root of site collection.

I tried to place the files in a sub site but could not.

Oct 26, 2009 at 9:50 PM

Thanks guys!

Maybe im doing something wrong? Here are my steps to attempt the example with the states and regions on the $().SPServices.SPCascadeDropdowns documentation page.

1) Create 2 lists with the same data shown and column names

2) Create a Third list with Country(choice), Region (lookup), State (lookup)

3) Open the Third list's NewForm.aspx page in SPD

4) Copy jquery-1.3.2.min.js and jquery.SPServices-0.4.1.min.js to the same dir

5) Cerate a <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> place holder

6) Paste this code inside the palce holder:

<script language="javascript" type="text/javascript" src="jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="jquery.SPServices-0.4.1.min.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
			relationshipList: "Regions",
			relationshipListParentColumn: "Country",
			relationshipListChildColumn: "Title",
			parentColumn: "Country",
			childColumn: "Region"
			relationshipList: "States",
			relationshipListParentColumn: "Region",
			relationshipListChildColumn: "State",
			parentColumn: "Region",
			childColumn: "State"

 7) Save page / View - Nothing happens

Am I way off??? I think im missing something here in the steps? Or not undersanding what is happening. Thanks for all of your time an knowledge shared here!!


Oct 27, 2009 at 4:51 AM


You're heading in the right direction, but I think you may have gotten a little lost.  Are you just trying a proof of concept?  I hope so because you sohlud really put the .js files somewhere more central.

In any case:

4) Do you mean that you have put the .js files in the Third list's "folder" where the NewForm.aspx sits?

5) You shouldn't need to create this placeholder, as it ought to already exist.  If you created one, I'd be surprised if you didn't get an error.