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

Testing Alert not triggering

Mar 23, 2011 at 3:19 AM

Morning all,

I've possibly been staring at Python for too long today but I can't see anything wrong with this following code for the cascading drop downs.  If I'm missing something glaringly obvious, I'll make a donation to the charity of your choice.  Here's my edit of the standard code


<script language="javascript" type="text/javascript" src="http://sharepoint/sites/if_intranet/assets/jquery-1.5.1.min.js"></script>
<script language="javascript" type="text/javascript" src="http://sharepoint/sites/if_intranet/assets/jquery.SPServices-0.6.0.min.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
			relationshipList: "{DB2CCDA9-01C4-44CB-9509-A85B7F01B889}" //GUID of the look-up list
			relationshipListParentColumn: "Level_x0020_1_x0020_Metadata", //Static ID of the Parent Column look up list
			relationshipListChildColumn: "Title", //Static ID of the Child Column in the look up list
			parentColumn: "Metadata Level 1",
			childColumn: "Metadata Level 2",
			debug: true

I've hardcoded the library URLs to make sure they can be referenced, they work with both these and absolute URLS.  Despite this, the alert I've got in the document function doesn't trigger, not does the debugger.  The pre-requisites have also been met as far as look-ups are concerned.  Any ideas are welcome.



Mar 23, 2011 at 3:26 AM
It's hard to tell on my iPhone (where I'm looking at this), but I think you're missing a comma at the end of the relationshipList option.

Mar 23, 2011 at 3:32 AM

Well spotted, and one I daftly missed.  I've restored this but to no avail.  I'm using the correct versions I believe?  SPServices 0.6.0 is compatible with JQuery 1.5.1?

Mar 23, 2011 at 1:55 PM

If an alert inside the $(document).ready() isn't firing, then the script reference to the jQuery library isn't right. In SPD, you can Ctlr-Click on the src to see if it is valid.

The versions you are using are correct, assuming that the contents of the files are what the filenames indicate. (Yes, I've seen people just rename the files, thinking that changed the contents somehow. SharePoint is magic, but not that magic.)


Mar 23, 2011 at 4:14 PM

For reasons unbeknown to me (I'm not ruling out vodoo or necromancy, but more likely, a good sleep) this now works.  A promise is a promise though, so a donation to MOS is on its way.

Thanks for your help