Quantcast
Channel: SharePoint 2010 - General Discussions and Questions forum
Viewing all articles
Browse latest Browse all 17574

List toolbar is missing after adding content querry webpart

$
0
0

I have added a content editor webpart to a page which contains some scripts to truncate certain fields in a particular list. Now due to this content editor webpart addition the list toolbar i.e. the ribbon at the top became invisible. I cannot see the contextual ribbon for the list at the top unless I click on any particular item in the list. In order that the ribbon must be visible I added another content editor webpart and added the following script to the webpart

<script type="text/javascript">

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

After this now I can see the ribbon but the behaviour is unsteady. That means some times the ribbon is visible but sometimes it is not. and some times it takes very long to load the ribbon.

Any ides on what I can do so that the ribbon for the list is visible without any issues.

Thanks in advance!!


Viewing all articles
Browse latest Browse all 17574

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>