【问题标题】:Sharepoint ribbon button click not executing on I.ESharepoint 功能区按钮单击未在 I.E 上执行
【发布时间】: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


    【解决方案1】:

    虽然这个问题很老了,但让我提出一个解决方案:

    在 IE 中调试功能区按钮/行为时,您应该使用 InPrivate 模式窗口,您应该在每次部署解决方案后关闭该窗口。 IE 缓存旧版本的解决方案可能会导致头痛和长时间工作

    【讨论】:

      猜你喜欢
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 2020-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多