in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Spiral Out

Hide Open in windows Explorer options from Action menu

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 (aIdea.text)
            {
                if (aIdea.text === title)
                {
                    return aIdea;
                }
            }
        }

        return null;
    }
function hideWinExp()
{
 var o = GetElementByText("ie:menuitem","Open with Windows Explorer");
            if (o)
            {
                o.disabled = true;
            }
}
_spBodyOnLoadFunctionNames.push("hideWinExp");

</script>
 

Note :

replace  

Idea =  [  i  ]  no spaces or copy it into text file

Comments

 

Links (7/24/2008) « Steve Pietrek - Everything SharePoint said:

Pingback from  Links (7/24/2008) &laquo; Steve Pietrek - Everything SharePoint

July 24, 2008 7:45 PM
 

Tom.VanGaever said:

Hi,

I know you can disable this in the schema.Maybe its better to change it there

here's a link to more info:

www.dotnetmafia.com/.../how-to-remove-the-explorer-view-from-a-document-library-template.aspx

July 29, 2008 5:53 AM
 

Bazztrap said:

nice I was thinking of creating  Actions template and remove it from there

July 30, 2008 5:59 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts