Friday, March 25, 2011

Hide List View Tool bar Items

function hideListViewToolbarItems()
var doc = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i < doc.length; i++) {
var itm = doc[i];
if ('OpenInExplorer') != null)
var p = itm.parentNode;


A few thoughts as to why it's not working...

1) Match for part of the text and leave off the "zz33_" as that part can be different for every page.

2) Don't delete the nodes, hide them

3) Make sure your code is loaded after the web part with the View dropdown (i.e. if using a Content Editor Web Part, move it under the list web part)


No comments:

Post a Comment