Following is the script to hide the Show a graphical
summary of responses Show all
responses link in Survey overview page as shown in screenshot.
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideanchor");
_spBodyOnLoadFunctionNames.push("changeiMageblank");
_spBodyOnLoadFunctionNames.push("changeiMageblank1");
function hideanchor()
{
var anchort= document.getElementById("diidSurveyResults");
var anchort1= document.getElementById("diidResultsByUser");
anchort.style.display = 'none';
anchort1.style.display = 'none';
}
function changeiMageblank()
{
var inputs = document.getElementsByTagName("img");
for(i = 0; i<inputs.length; i++)
{
if(inputs[i].getAttribute("src").indexOf("/_layouts/images/rect.gif") != -1)
{
inputs[i].parentNode.removeChild(inputs[i]);
}
}
}
function changeiMageblank1()
{
var inputs = document.getElementsByTagName("img");
for(i = 0; i<inputs.length; i++)
{
if(inputs[i].getAttribute("src").indexOf("/_layouts/images/rect.gif")!= -1)
{
inputs[i].parentNode.removeChild(inputs[i]);
}
}
}
_spBodyOnLoadFunctionNames.push("hideanchor");
_spBodyOnLoadFunctionNames.push("changeiMageblank");
_spBodyOnLoadFunctionNames.push("changeiMageblank1");
function hideanchor()
{
var anchort= document.getElementById("diidSurveyResults");
var anchort1= document.getElementById("diidResultsByUser");
anchort.style.display = 'none';
anchort1.style.display = 'none';
}
function changeiMageblank()
{
var inputs = document.getElementsByTagName("img");
for(i = 0; i<inputs.length; i++)
{
if(inputs[i].getAttribute("src").indexOf("/_layouts/images/rect.gif") != -1)
{
inputs[i].parentNode.removeChild(inputs[i]);
}
}
}
function changeiMageblank1()
{
var inputs = document.getElementsByTagName("img");
for(i = 0; i<inputs.length; i++)
{
if(inputs[i].getAttribute("src").indexOf("/_layouts/images/rect.gif")!= -1)
{
inputs[i].parentNode.removeChild(inputs[i]);
}
}
}
</script>
hideanchor Function hides the hyperlinks | |
changeiMageblank Function removes the images |
Thank you very much. Exactly what I have been looking for.
ReplyDeleteReally Helpful!!
ReplyDeleteGreat job. Thanks for sharing.
ReplyDeleteThank you sharing this code.
ReplyDeleteThank for your share!!
ReplyDelete