vendredi 13 mars 2015

Cascading dropdown in Sharepoint 2010, issue using SPCascade



I'm trying to use this script http://ift.tt/1C4ndWb and have followed each step accurately, however when testing it, the drop-downs simply display (None) rather than the values saved in the first list. I tried using the included version of SPServices library and Jquery as well as the latest version of each, however no difference.


Any suggestions to what could be the cause or what I need to do. Due to various limitations using InfoPath, Visual Studio and Sharepoint 2013 is not an option.


edit: added code. I used the same names and columns as in the example detailed in the above link in order to avoid issues with wrong naming. The Column order for the LocationList is reversed compared to the other two, as per the example, in order to select Continent first, then country, state, City. I.e. from larger to smaller units.


following code was added in both the EditForm.aspx and the NewForm.aspx files.



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

<script type="text/javascript" src="../../JQuery DocLib/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../JQuery DocLib/jquery.SPServices-2013.01.min.js"></script>
<script type="text/javascript" src="../../JQuery DocLib/SPCascade.1.1.1.min.js"></script>

<script type="text/javascript">

$(document).ready(function() {

$().SPCascade({
destListColTitles: ['Continent','Country','State','City'],
srcListColInternalNames: ['Continent','Country','State','Title'],
srcListName: 'CitiesLookupList',
debug: 'true'
});

});

</script>


CitiesLookupList


LocationsList








0 commentaires:

Enregistrer un commentaire