Cascading dropdownlist not working. One more! :(

Oct 29, 2009 at 6:47 PM

Hi Marc,

I went through the discussions and every point but somehow I think I am missing something and the cascading dropdown is not working. Here is my scenario:

I have 3 lists for this:

Topic: Title (Renamed as Topic Name)

SubTopic: Title (Renamed as SubTopic Name), Topic (Lookup to Topic -> Topic Name)

Products: Contains 15 fields 2 of them are Topic (Lookup to Topic -> Topic Name), SubTopic (Lookup to SubTopic -> SubTopic Name)

Now on the custom NewProductForm.aspx for Products list I have the following code:

<asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">
<script language="javascript" type="text/javascript" src="/sites/rootsite/Documents/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="/sites/rootsite/Documents/jquery.SPServices-0.4.1.min.js"></script>
<script language="javascript" type="text/javascript">
 $(document).ready(function() {
   alert('Hi Shalin')
  $().SPServices.SPCascadeDropdowns({
   relationshipList: "SubTopic",
   relationshipListParentColumn: "Topic",
   relationshipListChildColumn: "Title",
   parentColumn: "Topic",
   childColumn: "SubTopic Name"
  });
 });
</script>

However, when I goto new page it doesn't work and shows me everything. I did try to place alert inside the function but it doesn't work. only on outside as shown above it works. I did check the path of jquery references and they are correct as well.

Please help and let me know what I am doing wrong here!

Thanks! Shalin

Oct 29, 2009 at 6:57 PM

Don't worry I was able to make it out....silly mistake!!

It should be:

$().SPServices.SPCascadeDropdowns({
   relationshipList: "SubTopic",
   relationshipListParentColumn: "Topic",
   relationshipListChildColumn: "Title",
   parentColumn: "Topic",
   childColumn: "SubTopic"
  });
 });

Coordinator
Oct 29, 2009 at 7:18 PM

Glad you got it to work!

Let me know if you have any more questions.

M.