Sunday, 29 July 2012

Hide Survey Toolbar

Script to hide the Actions & Settings Menu in Survey toolbar.
       
Insert the following script in CEWP of the page where the survey overview is displayed.


<script>
      function HideDiv(name) { 
           var div = document.getElementsByTagName('div'); 
           for (var i = 0; i < div.length; i++) { 
              var str = div[i].id; 
              if (str.indexOf(name) >= 0) { 
                  var viewInExplorer = div[i]; 
                  if (viewInExplorer != null) { 
                      if (viewInExplorer.parentNode != null) 
                          viewInExplorer.parentNode.removeChild(viewInExplorer); 
                  } 
              } 
          } 

      } 
      HideDiv("ListActionsMenu"); 
      HideDiv("ListSettingsMenu"); 
  </script>

       

No comments:

Post a Comment