Search This Blog

Total Pageviews

Tuesday, August 8, 2017

Show Sharepoint Ribbon on page Load

<script>
setTimeout(function() {
var elem = document.getElementById("MSOZoneCell_WebPartWPQ2");
if(elem != null) {
var dummyevent = new Array();
dummyevent["target"] = elem;
dummyevent["srcElement"] = elem;
WpClick(dummyevent);
}
}, 100);
</script>

The above script will invoke the ribbon by default in IE( for the specific webpart), incase if you added multiple webparts.

No comments:

Post a Comment