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

Newbie Debug Questions re SPCascadeDropdowns

Jun 21, 2011 at 6:31 PM

Hi, I'm an end user, swimming in the deep water trying to create some very necessary cascading dropdowns. Here are my neophyte questions:

1. I created a NewForm and added the code as follows:

<%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full"  %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
 <SharePoint:ListFormPageTitle runat="server"/>
 <script  language="javascript" type="text/javascript" src="/schools/business/assessment/jQuery%20Library/jquery-1.6.1.min.js"></script>
<script  language="javascript" type="text/javascript" src="/schools/business/assessment/jQuery%20Library/jquery.SPServices-0.6.1.min.js"></script>
<script language="javascript" type="text/javascript">
 alert("I'm in ready");
 $(document).ready(function() {
   relationshipList: "Goals",
   relationshipListParentColumn: "UnitShortName_x003a_ID",
   relationshipListChildColumn: "GoalShortName",
   parentColumn: "UnitShortName:ID",
   childColumn: "Goal Short Name",
   debug: true


<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
 <span class="die"> ...etc etc

Is this an acceptable location for the script? If not, where?

2. SPDesigner flagged the phrase "language = javascript" as "not permitted for the script tag." Should I remove it?

3. I successfully ctrl-clicked the addresses to the jQuery library, and they successfully took me to those pages. Is this proof positive that the Library is being accessed?

4. In the Designer code window, the $ signs are underlined. When they are ctrl-clicked, an alert appears: "Code hyperlink not found." Is this significant?

5. In a lame attempt to debug (oh yes, the presenting problem is that nothing pertaining to this script appears to work), I inserted an alert line at different places within the script, and at no time did an alert appear. That suggests to me that the script isn't running. True? And what might be the fix?

I think I have been true to the directions for the parameters of the routine. But, as my questions reveal, I don't know enough about JS to debug things. Any help appreciated.

John V

Jun 21, 2011 at 9:39 PM


I generally put my script below the line:

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

I've found that this is the most reliable location. I think if you move things there, you'll start to see the alerts.


Jun 21, 2011 at 11:59 PM

A perfect bit of advice; thanks! Once moved, the script started working.

I have some follow-up items:
1. Is there any way to make the second dropdown selectable with a single click only? My app seems to require a double click.
2. I would suggest adding a line or two in your documentation about proper script placement unless I overlooked it.

Again, many thanks, John

Jun 22, 2011 at 2:20 AM


It just so happens that I have a new capability in the release coming out tonight, v0.6.2, which converts those complex dropdowns to simple dropdowns (selects). This blog post explains it, though the approach changed a little since I posted it.

There is actually some info on my recommendations toward the bottom of this page in the docs. No matter where I move this stuff, people tend not to read it. :-) Suggestions?