Customaction Menu<p><br/>Dear All,<br/><br/>I have created ECB menu through content Editor web part....the content editor web parts contain below code....<br/><br/>below code is working fine...but it menu is appearing for all type of document library(ex:folder,word,excel sheets and text files...etc.,).but i need only on excel sheet document libraries. how can i disable ECB menu where it's not requiered to display at all. please help me out...<br/><br/><strong>Source code:</strong><br/>&lt;script language=&quot;javascript&quot;&gt;</p> <p>function Custom_AddDocLibMenuItems(m, ctx)<br/>{<br/> var currentItemFileUrl=null; <br/> var currentItemFSObjType=null;</p> <p> if (currentItemFileUrl == null) <br/> currentItemFileUrl = itemTable.ServerUrl; <br/> if (currentItemFSObjType == null) <br/> currentItemFSObjType = itemTable.FSObjType;</p> <p> if( currentItemFSObjType !=1 )<br/> {</p> <p> var strAction = 'window.navigate(&quot;<a href="http://xxx/xxx/Flat1.aspx?RootFolder">http://xxx/xxx/Flat1.aspx?RootFolder</a>=&quot;+  ReplaceURL(currentItemFileUrl))'</p> <p> var strImagePath = ctx.imagesPath+&quot;III16.GIF&quot;;<br/> var strDisplayText = &quot;Discussion/Comments board&quot;;</p> <p> CAMOpt(m, strDisplayText, strAction, strImagePath);<br/> CAMSep(m);</p> <p> strImagePath = ctx.imagesPath+&quot;RECURMTG.GIF&quot;<br/> strAction = 'window.navigate(&quot;<a href="http://xxx/xxx/AssignPublicView.aspx&quot;)'">http://xxx/xxx/AssignPublicView.aspx&quot;)'</a><br/> CAMOpt(m, &quot;Publish to public&quot;, strAction,strImagePath);<br/> CAMSep(m);<br/> }<br/>  return false; <br/>}<br/> <br/>&lt;/script&gt;<br/><br/>Thanks in advance....<br/></p><hr class="sig">Ravichandran.K Bangalore© 2009 Microsoft Corporation. All rights reserved.Fri, 03 Jul 2009 14:44:17 Z296545a6-97ad-4b55-be76-49d0fd5a0c26http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/296545a6-97ad-4b55-be76-49d0fd5a0c26#296545a6-97ad-4b55-be76-49d0fd5a0c26http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/296545a6-97ad-4b55-be76-49d0fd5a0c26#296545a6-97ad-4b55-be76-49d0fd5a0c26PuttaRavihttp://social.technet.microsoft.com/Profile/en-US/?user=PuttaRaviCustomaction Menu<p><br/>Dear All,<br/><br/>I have created ECB menu through content Editor web part....the content editor web parts contain below code....<br/><br/>below code is working fine...but it menu is appearing for all type of document library(ex:folder,word,excel sheets and text files...etc.,).but i need only on excel sheet document libraries. how can i disable ECB menu where it's not requiered to display at all. please help me out...<br/><br/><strong>Source code:</strong><br/>&lt;script language=&quot;javascript&quot;&gt;</p> <p>function Custom_AddDocLibMenuItems(m, ctx)<br/>{<br/> var currentItemFileUrl=null; <br/> var currentItemFSObjType=null;</p> <p> if (currentItemFileUrl == null) <br/> currentItemFileUrl = itemTable.ServerUrl; <br/> if (currentItemFSObjType == null) <br/> currentItemFSObjType = itemTable.FSObjType;</p> <p> if( currentItemFSObjType !=1 )<br/> {</p> <p> var strAction = 'window.navigate(&quot;<a href="http://xxx/xxx/Flat1.aspx?RootFolder">http://xxx/xxx/Flat1.aspx?RootFolder</a>=&quot;+  ReplaceURL(currentItemFileUrl))'</p> <p> var strImagePath = ctx.imagesPath+&quot;III16.GIF&quot;;<br/> var strDisplayText = &quot;Discussion/Comments board&quot;;</p> <p> CAMOpt(m, strDisplayText, strAction, strImagePath);<br/> CAMSep(m);</p> <p> strImagePath = ctx.imagesPath+&quot;RECURMTG.GIF&quot;<br/> strAction = 'window.navigate(&quot;<a href="http://xxx/xxx/AssignPublicView.aspx&quot;)'">http://xxx/xxx/AssignPublicView.aspx&quot;)'</a><br/> CAMOpt(m, &quot;Publish to public&quot;, strAction,strImagePath);<br/> CAMSep(m);<br/> }<br/>  return false; <br/>}<br/> <br/>&lt;/script&gt;<br/><br/>Thanks in advance....<br/></p><hr class="sig">Ravichandran.K BangaloreFri, 03 Jul 2009 14:07:11 Z2009-07-03T14:07:11Zhttp://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/296545a6-97ad-4b55-be76-49d0fd5a0c26#4435b01e-c9f9-4693-a5fc-ff456a488743http://social.technet.microsoft.com/Forums/en-US/sharepointdevelopment/thread/296545a6-97ad-4b55-be76-49d0fd5a0c26#4435b01e-c9f9-4693-a5fc-ff456a488743Mike Walsh MVPhttp://social.technet.microsoft.com/Profile/en-US/?user=Mike%20Walsh%20MVPCustomaction MenuPerhaps you can explain why this was sent to the Workflow forum ?<br/><br/>I see no reference to workflow in it at all.<br/><br/><br/>Moving to the Programming forum as I can at least see code there.<br/><br/><br/><hr class="sig">WSS FAQ sites: <a href="http://wssv2faq.mindsharp.com">http://wssv2faq.mindsharp.com</a> and <a href="http://wssv3faq.mindsharp.com">http://wssv3faq.mindsharp.com</a> <br/>Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) <a href="http://wssv3faq.mindsharp.com/Lists/v3 WSS FAQ/V Books.aspx">http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx</a>Fri, 03 Jul 2009 14:43:54 Z2009-07-03T14:43:54Z