kwizcom banner advertisement

Display Lists from Other Site Collection/Web Application Using JQuery

Another frequent requirement is to display Lists/Libraries from Root site to Sub-site or Sub-site to Root site, and in some cases from Cross Site collection. While this can be fulfilled by Web Services, Custom Web Parts, etc, here is the simple JQuery method to display SharePoint list from another site collection or from different site.

I deployed the JQuery file to my WFEs and referred it in the script:
<script type="text/javascript" src="/_layouts/jquery/jquery.min.js"></script>

<!-- placeholder for processing Image and List View -->
<div id="ListViewPlaceHolder"><img src="/_layouts/images/GEARS_AN.GIF" alt="" /></div>
 
<script type="text/javascript">
<!-- Specify the View URL of the list you want to show: -->

var ShowWP = "https://portal.crescent.com/clients/mcdonald/Lists/ClientNotes/AllItems.aspx";
$("#ListViewPlaceHolder").load(ShowWP +" #WebPartWPQ2 .ms-listviewtable",function() {
    $("#ListViewPlaceHolder *").removeAttr("id onclick onfocus onmouseover");
});

</script>

SharePoint User Toolkit  at http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Cross-Site-List-Snapshot.aspx provides UI to Generate the script. Just enter your List URL and get the Javascript, place it in CEWP or wherever applicable.
 sharepoint display list from another site collection

By the way, SharePoint User Toolkit offers few more such features like Image Rotators, Tabs, etc.
Display Lists from Other Site Collection/Web Application Using JQuery Display Lists from Other Site Collection/Web Application Using JQuery Reviewed by Salaudeen Rajack on July 29, 2012 Rating: 5

1 comment:

  1. yes, your solution is ok, but i want display list like the gantt.your solution display list if list view is html but if list view gantt. your solution works? can you help me

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.