I was looking for JavaScript to hide this "Open in Windows Explorer" for document library. I found quite a few posts with javascript, which I tried and no success. Then I went back to my ideal JavaScript framework J query( Yes I dont like learning all script details when I got J query's accessibility functions) anyway still no luck and then I found this post about hiding "upload Single Documents" options
http://asadewa.wordpress.com/2008/02/23/removing-single-file-upload-menu-from-document-library-toolbar-moss-2007/
And I figured the problem I had with my code. I was not adding the script during the onload event. Anyway below is the modfied code to use for hiding "open in Windows Explorer" and also using spBodyOnLoadFunctionNames to push Function for onLoad event.
<script>
function GetElementByText(tagName, title)
{
var a = document.getElementsByTagName(tagName);
for (var i=0; i < a.length; i++)
{
if (a
.text)
{
if (a
.text === title)
{
return a
;
}
}
}
return null;
}
function hideWinExp()
{
var o = GetElementByText("ie:menuitem","Open with Windows Explorer");
if (o)
{
o.disabled = true;
}
}
_spBodyOnLoadFunctionNames.push("hideWinExp");
</script>
Note :
replace
= [ i ] no spaces or copy it into text file
Posted
07-23-2008 7:12 PM
by
Bazztrap