Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Sharepoint功能区按钮单击不在上执行,即_Javascript_Internet Explorer_Sharepoint_Sharepoint 2010_Ribbon - Fatal编程技术网

Javascript Sharepoint功能区按钮单击不在上执行,即

Javascript Sharepoint功能区按钮单击不在上执行,即,javascript,internet-explorer,sharepoint,sharepoint-2010,ribbon,Javascript,Internet Explorer,Sharepoint,Sharepoint 2010,Ribbon,我有一个自定义功能区按钮,正在部署到自定义SharePoint编辑表单。我已经将相同的代码/逻辑部署到其他表单中,没有问题。功能区按钮显示在自定义编辑表单中的正确位置,但是,当我单击它时,它会抛出一个javascript null异常。即使是一个简单的警报也不起作用。这仅在Internet Explorer(所有版本)上发生。它在铬上工作。以下是ribbon elements.xml: <Elements xmlns="http://schemas.microsoft.com/share

我有一个自定义功能区按钮,正在部署到自定义SharePoint编辑表单。我已经将相同的代码/逻辑部署到其他表单中,没有问题。功能区按钮显示在自定义编辑表单中的正确位置,但是,当我单击它时,它会抛出一个javascript null异常。即使是一个简单的警报也不起作用。这仅在Internet Explorer(所有版本)上发生。它在铬上工作。以下是ribbon 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>


知道问题出在哪里吗

尽管这个问题已经很老了,但让我提出一个解决方案:

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