【发布时间】:2014-10-02 18:40:05
【问题描述】:
我有一个自定义功能区按钮,我将其部署到自定义 SharePoint 编辑表单。我已经将相同的代码/逻辑部署到其他形式没有问题。功能区按钮显示在自定义编辑表单内的正确位置,但是,当我单击它时,它会引发 javascript null 异常。即使是简单的警报也不起作用。这只发生在 Internet Explorer(所有版本)上。它适用于铬。这是功能区elements.xml:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="Ribbon.ListForm.Displays" Location="CommandUI.Ribbon.EditForm"
RegistrationId="10000"
RegistrationType="List" Title="Add Ribbon Customization">
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Edit.Actions.Controls._children" >
<Button Id="Ribbon.ListForm.Display.Actions.AttachFiles" Command="Command_AttachFiles"
Image16by16="_LAYOUTS/$Resources:core,Language;/IMAGES/formatmap16x16.png" Image16by16Top="-128" Image16by16Left="-144"
Image32by32="_LAYOUTS/$Resources:core,Language;/IMAGES/formatmap32x32.png" Image32by32Top="-352" Image32by32Left="-128"
LabelText="Attach File" TemplateAlias="o1" Sequence="2"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="Command_AttachFiles" CommandAction="javascript:alert('Test Ribbon');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>
知道问题可能是什么吗?
【问题讨论】:
标签: javascript internet-explorer sharepoint sharepoint-2010 ribbon