无法读取属性"SPCascadeDropdowns" [英] Cannot read property 'SPCascadeDropdowns'

查看:83
本文介绍了无法读取属性"SPCascadeDropdowns"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用这个再次将我的头撞在墙上.我正在尝试创建一个具有主下拉菜单的页面,该页面将级联为辅助下拉菜单(过滤列表),但出现此错误:

 

未捕获的TypeError:无法读取未定义的属性'SPCascadeDropdowns' < anonymous>. (NewForm.aspx?Source = TheSite.aspx& ContentTypeId = 0x010044DDE520BE4D40439FD3F934B5E958D0& RootFolder =:588) 在j(jquery.js:3148) 在Object.fireWith [as resolveWith](jquery.js:3260) 在Function.ready(jquery.js:3472) 在HTMLDocument.J(jquery.js:3503)

这是NewItem.aspx中SharePoint列表中的代码

< script type =" text/javascript"language ="javascript" src ="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"</script>
    < script type ="文本/javascript" language ="javascript" src ="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js"</script>
    < script type =文本/javascript">
$ {document).ready(function()
{
$().SPServices.SPCascadeDropdowns(
{
lationshipList:"MeetingTools",
lationshipListParentColumn:"Sourcess",
lationshipListChildColumn:"MtgDates",
parentColumn:"Sourcess",
childColumn:"SourceDateTimess",
调试:true
});
});
</script>

如果我在SPServices行之前放了一个警报,它就在那儿,但是我认为它绕过了SPServices的功能,因为当它试图加载它时,由于某种原因它不能.我已经在IE,Edge甚至Chrome中对此进行了测试.

感谢您提供的信息


布拉德·艾里森

解决方案

嗨布拉德,

要实现此目的,我们可以使用jQuery级联下拉插件,它非常易于使用.

有关更多信息,我们可以参考以下文章.

https://www.npmjs.com/package/jquery-cascading-dropdown

https://www.jqueryscript.net/demo/Dynamic-jQuery-级联-下拉列表-插件/

最诚挚的问候,

李刘


Banging my head on the wall again with this one.  I am trying to do a page with a main drop down that will cascade into a secondary dropdown (a filtered list) and I get this error:

Uncaught TypeError: Cannot read property 'SPCascadeDropdowns' of undefined at HTMLDocument.<anonymous> (NewForm.aspx?Source=TheSite.aspx&ContentTypeId=0x010044DDE520BE4D40439FD3F934B5E958D0&RootFolder=:588) at j (jquery.js:3148) at Object.fireWith [as resolveWith] (jquery.js:3260) at Function.ready (jquery.js:3472) at HTMLDocument.J (jquery.js:3503)

This is the code in the NewItem.aspx for the SharePoint list

<script type="text/javascript" language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices-2014.02.min.js"></script>
    <script type="text/javascript">   
		$(document).ready(function ()  
		{ 
		    $().SPServices.SPCascadeDropdowns(  
		    {  
		        relationshipList: "MeetingTools",   
		        relationshipListParentColumn: "Sourcess",   
		        relationshipListChildColumn: "MtgDates",   
		        parentColumn: "Sourcess",   
		        childColumn: "SourceDateTimess",   
		        debug: true   
		     });  
		});  
	</script>  

If I put an alert just before the SPServices line, it is hitting there, but then I think it is bypassing the function for the SPServices because when it tries to load it, it cannot for some reason.  I have tested this in both IE, Edge, and even Chrome.

Thanks for the information


Brad Allison

解决方案

Hi Brad,

To achieve this, we can use jQuery cascading dropdown plugin, it is very easy to use.

For more information, we can refer the below articles.

https://www.npmjs.com/package/jquery-cascading-dropdown

https://www.jqueryscript.net/demo/Dynamic-jQuery-Cascading-Dropdown-Lists-Plugin/

Best regards,

Lee Liu


这篇关于无法读取属性"SPCascadeDropdowns"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆