A simple method to display a list in another site

This is one of the frustrations with the SharePoint UI: you can’t display on your site a list from another site.

Well, of course, you have the Page Viewer Web Part, which allows you to embed in your page another Web page. But usually the result doesn’t look good, as the embedded content doesn’t fit nicely in the host page.

If you are looking for something nicer, there is still hope. You may for example have SharePoint Designer, in which case you can use the Data View Web Part to display a list from another site. However, in SharePoint 2007 I have not been able to make it work across site collections (did I miss something?).

The next level is to build your own viewing interface, and use XML to retrieve the content of the list (through the URL protocol, Web Services or RSS for example).

For today, let’s keep it simple. I’d like to offer an alternate option: a “quick and not too dirty” way to display a simple, flat list in another site.

I already mentioned that the iframe was part of my toolbox, so let’ s put it to work. As you’ll see, there are several limitations to my method, but it should be helpful if for example you’d like to share a contacts list, an announcements list or an events list across sites or even site collections. Also, just like for the “HTML calculated column”, I hope to bring some improvements in the future.

I have also written an adaptation using jQuery, as it seems to quickly gain popularity in the Microsoft world.

First, a demo

On my top level site, I maintain a list of updates:
http://www.pathtosharepoint.com/Lists/Updates/Newsletter.aspx

Using my scripts, here is how the list is rendered in a sub-site:
http://www.pathtosharepoint.com/CrossSite/default.aspx
The list is pulled twice in this demo: the first using an iframe, the second using jQuery.

Your turn!

The first step is easy, you may already have done it: choose the list that you want to display in other sites, and create a specific view if needed. The URL of your page will look like:

http://domain.com/SiteCollection1/SourceSite/SourceList/MyView.aspx

You can also decide to stick to the default view:

http://domain.com/SiteCollection1/SourceSite/SourceList/AllItems.aspx

Or maybe you have no control over the source site, in which case you’ll simply pick one of the existing views.

Second step: in the following code, replace the dummy URL with the URL of your source list. Then, on the target site drop the code in a CEWP:

<!-- Load and display list - iframe version -->
<!-- Questions and comments: Christophe@PathToSharePoint.com -->

<DIV id="ListPlaceholder"><IMG src="/_layouts/images/GEARS_AN.GIF"></DIV>

<!-- Paste the URL of the source list below: -->
<iframe id="SourceList" style="display:none;" src="http://domain.com/SiteCollection/SourceSite/SourceList/MyView.aspx" onload="DisplayThisList()"></iframe>

<script type="text/javascript">
function DisplayThisList()
{
var placeholder = document.getElementById("ListPlaceholder");

var displaylist = null;
var sourcelist = document.getElementById("SourceList");

try {
   if(sourcelist.contentDocument)
      // Firefox, Opera

      {displaylist = sourcelist.contentDocument.getElementById("WebPartWPQ1") ;}
   else if(sourcelist.contentWindow)
      // Internet Explorer

      {displaylist = sourcelist.contentWindow.document.getElementById("WebPartWPQ1") ;}
   else if(sourcelist.document)
      // Others?

      {displaylist = sourcelist.document.getElementById("WebPartWPQ1") ;}
}
catch(err) { alert ("Loading failed");}

displaylist.removeChild(displaylist.getElementsByTagName("table")[0]);
var allDescendants = displaylist.getElementsByTagName("*");
for (i=0;i<allDescendants.length;i++) {
allDescendants[i].removeAttribute("id");
allDescendants[i].removeAttribute("onclick");
allDescendants[i].removeAttribute("onfocus");
allDescendants[i].removeAttribute("onmouseover");
}
placeholder.innerHTML = displaylist.innerHTML;
}
</script>

Some limitations

- for now, the above code will only work for simple, flat lists. For example it won’t work with grouped items. I plan to share improved versions in the future, your proposals are welcome!
– the context menus won’t work, and are actually disabled. You can only view the items and click to open them.
– it works fine if the source list and the target site are on the same domain (same http://domain.com). If you try on different domains, let me know the result (it may depend on your browser).

An adaptation for jQuery

Update [April 11, 2010]: check out this post for an updated version of the jQuery code.

We can get a similar result with jQuery’s load function:

<!-- Load and display list - jQuery version -->
<!-- Questions and comments: Christophe@PathToSharePoint.com -->
<DIV id="ListPlaceholder"><IMG src="/_layouts/images/GEARS_AN.GIF"></DIV>

<script type="text/javascript">
// Paste the URL of the source list below:
var SelectedView = "http://domain.com/SiteCollection1/SourceSite/SourceList/MyView.aspx";
$("#ListPlaceholder").load(SelectedView+" #WebPartWPQ1 .ms-listviewtable",function() {
$("#ListPlaceholder *").removeAttr("id");
$("#ListPlaceholder *").removeAttr("onclick");
$("#ListPlaceholder *").removeAttr("onfocus");
$("#ListPlaceholder *").removeAttr("onmouseover");
});
</script>

Note: remember that jQuery is actually JavaScript. jQuery gives a nice crisp look to the code, but it doesn’t necessarily mean that it runs faster.

How it works

Each Web Part on a page has a unique identifier. WebPartWPQi. If only one list is diplayed on the page, its identifier is WebPartWPQ1. This is what we use in the script to call the list.

Update [Jan 22, 2009] I checked a couple MOSS implementations, and it seems that the WebPartWPQ1 id is assigned to the search drop-down menu. In this case, you should replace WebPartWPQ1 with WebPartWPQ2 in the above scripts.

Any jQuery experts out there?

I am very curious about the load function. It looks quite powerful, and I wonder what’s behind… Feel free to step in if you have any information!

About these ads

200 thoughts on “A simple method to display a list in another site

  1. This is fantastic! Great post! We had been debating writing some custom web part to provide similar functionality. I much prefer this option!

    • Before writing the inner HTML I would like to restrict the Text in the blog post body to 200 Characters. Is it possible to achieve that with in this solution

  2. Christophe,

    The ability to go across site collection borders was in FP 2003 Data View (for use with WSS 2.0 and SPS 2003 only if anyone else is reading) but dropped in SPD 2007.

    Instead you have to use the same method that was used for FP 2003 if the data you wanted to access was stored on a different SP server. That is you need to access the Database (in Data View) to get at the data from another site collection.

    It’s possible using the UI and only takes a little more effort.

    Mike

  3. Update: I worked with Sean to resolve his issue.

    If you need to apply the method to multiple lists, you need to use different names in the script for each list. So for example you’ll use ListPlaceholder1, SourceList1, etc. for the first list, and ListPlaceholder2, SourceList2, etc. for the second list.

    Don’t use it for too many lists; remember that the iframe loads a whole page everytime.

  4. With Christophe’s help I created 3 list displays from different sites below my main site. These sites each contained a list with a single list line for Management details. Like Christophe said: use ListPlaceholder1, SourceList1, etc. for the first list, and ListPlaceholder2, SourceList2, etc. And so on for each separate list.

    Team name: single line of text
    Current Overall status: choice
    Current Customer satisfaction: choice
    Current Financial status: choice

    Each of the choice selections also has a second calculated column using Christophe’s color coding and script to html. I customized a view for editing and one for the up list display.
    The end result is 3 single line list display web parts on a management page from 3 separate sites. Giving upper management a quick and dirty visual indicator with out having to go to each site.
    I have been looking for a way to do this without using SPD for a long time. Thank you again Christophe for all your help.

  5. Pingback: Display the Quick Launch in a Web Part page « Path to SharePoint

  6. Again another great idea. The functionality I have been trying to make happen is to have the ability to use the list from another site. I have a parent with a list of countries. in my child sites I want to create a lookup that they all reference at the parent, a single source. can this be done?

  7. @Sean,

    Did you do this in a single CEWP, or did you use 3 webparts (1 for each list)? Trying to get multiple lists to work but failing miserably! I’m trying to display announcements and events from the parent site. I can get each one to work separately (i.e. if I only have one showing at a time) but not both at the same time. Any suggestions very gratefully received!

    Cheers,
    Adam

  8. Adam,

    Yes, I used three CEWPs for my site. Christophe suggested change ListPlaceholder and SourceList to ListPlaceholder1 and SourceList1. I had the same problem adding. There are many places to change. Here is a copy of my third CEWP. Change source to your list view url and give it a try. Also Do not use “replace” to change numbers. The “WebPartWPQ1″ should remain the same.

    copy:

    <!-- Load and display list - iframe version -->
    <!-- Questions and comments: Christophe@PathToSharePoint.com -->
    
    <DIV id="ListPlaceholder3" ><IMG src="/_layouts/images/GEARS_AN.GIF" style="width:32px;"/></DIV>
    
    <!-- Paste the URL of the source list below: -->
    <iframe id="SourceList3" style="display:none;" src="http://domain.com/SiteCollection1/SourceSite/SourceList/MyView.aspx" onload="DisplayThisList3()"></iframe>
    
    <script type="text/javascript">
    
    function DisplayThisList3()
    {
    var placeholder3 = document.getElementById("ListPlaceholder3");
    
    var displaylist3 = null;
    var sourcelist3 = document.getElementById("SourceList3");
    
    try {
       if(sourcelist3.contentDocument)
          // Firefox, Opera
    
          {displaylist3 = sourcelist3.contentDocument.getElementById("WebPartWPQ1") ;}
       else if(sourcelist3.contentWindow)
          // Internet Explorer
    
          {displaylist3 = sourcelist3.contentWindow.document.getElementById("WebPartWPQ1") ;}
       else if(sourcelist3.document)
          // Others?
    
          {displaylist3 = sourcelist3.document.getElementById("WebPartWPQ1") ;}
    }
    catch(err) { alert ("Loading failed");}
    
    displaylist3.removeChild(displaylist3.getElementsByTagName("table")[0]);
    var allDescendants3 = displaylist3.getElementsByTagName("*");
    for (i=0;i<allDescendants3.length;i++) {
    allDescendants3[i].removeAttribute("id");
    allDescendants3[i].removeAttribute("onclick");
    allDescendants3[i].removeAttribute("onfocus");
    allDescendants3[i].removeAttribute("onmouseover");
    }
    placeholder3.innerHTML = displaylist3.innerHTML;
    }
    </script>
    
  9. Again, remember that for each list you actually load a whole Web page.

    Do not discard more advanced methods like the Data View Web Part, the URL protocol or Web Services.

  10. Pingback: Using calculated columns to write scripts « Path to SharePoint

  11. Christophe, I think this is one of my favorite posts. Very useful and recently had a need for this. Now I may be reaching but something I have been toying with is better functionality for site collection admins. We can go to several pages to get data about the collection, but it is not clean and it is a nightmare to manage. I would like to display data from the “View all site content” page from all child sites. can this be done? What I mainly need is site sizes, but I can would settle for it by site, or library/lists. I know you can display one level down sites. I know you can go to a site collection page and view size of libraries/lists, is there a way to combine this on one page?

  12. Larry: the method allows to display any list in any other page, so you can gather all the information you need from your subsites in one page. But then there’s still a lot of work to combine all.
    Web Services seem to be the right approach in your case.

    I’ll publish this month an example of how to display the “View all site content” list in another page.

  13. Christophe: Many thanks for posting this great tool! I’m very new to Javascript, but know just enough to get the job done based on someone’s posted work (like yours). Like Sean, I modified the code in order to use it multiple times on one page. (I should note here that it works with personal views if you are setting up a page that will be used only by yourself.)

    The one (minor) inconvenience I have found is that when you click the ID or Title field to navigate to the full record (dispform.aspx), the Close button will redirect you to the default view of the source list on the target site. Not a problem for those of us who know how to use the back button, but potentially a bit confusing for the rest of the world. Would it be possible to modify the script in order to append something like Source=location.href to the ID/Title hyperlink? That way, the Close button on dispform.aspx would redirect you back to the starting page.

  14. Christopher, thank you for this method. It solved my issue. However I would like to ask how did you add the same look to your rendered list as is it in original site. When I use your script i get the list with no style at all as it is in sharepoint sites. Just only white page with correct data from other site list. Is there any fast method in SPD how to set it? Thank you for the answer.

  15. Again I am trying to break some things and I tried combining this script and the HTML cal column script. I could not convert the HTML on the viewing page. I added the script to the source page and it worked, converted HTML, in the source page, but when viewing this from another site, no luck all I get is the code. Can this be achieved?

  16. Larry: you need to add the script for the HTML cc to the target page, and make sure it runs after the list is loaded.
    Peter Allen is working on such an example. I think he’ll have something to share very soon!

  17. Christophe: Thanks! I got it now. If I put the script betweeen

    tags it works nice and the style is applicated on the list too.

  18. Nathan, interesting question. I think modifying the script to redirect to the original page is not too complicated. I’ll give it a try and post the solution if it works.

  19. Christophe, that may be the issue, getting it to run after it loads. Now there is a small delay in the list loading. I look forward to the post from Peter.
    thanks

  20. Pingback: Display a list in another site (Cont’d) « Path to SharePoint

  21. Amazing post which i was hunting for so long. But unfortunately, it is not working for me. I am trying to link a normal List from a sub site to a parent site in our INTRANET. all links are https enabled. After adding the IFRAME script to a CEWP it is not loading the link inserted inside.

    I have two CEWPS on this site. I even tried changing the ListPlaceHolders to such as ‘ListPlaceholder3′ as posted in one of the comments above here etc but it is not loading the custom link i had. The animated GIF keeps rotating and the list is not loading.

    Many thanks for your expert advise please…

  22. Sam, are you on wss 3.0 or MOSS? The scripts are slightly different. Also, first validate the method with one CEWP.
    I haven’t tested https links, but it should make no difference.

  23. Apologies Christophe… I just figured it out to get the list data populated in a CEWP. But if have multiple CEWP’s for getting the data from mutiple lists , while trying to save the script it shows the error ‘Cannot Retrieve properties…”; cannot save changes. Can you kindly advise what further changes if need to be done on this script to get mutiple CEWP’s working..

    Many thanks in advance.

    Sam

  24. Hi Chris,
    Thanks for the post. I managed to get it done. I make blog list with picture,title and published column. I fit it into right wp zone but it’s too big to fit in 200px box. Any idea to shrink it especially the picture.
    Thanks.

  25. Christophe, I’m having the same problem that Sam mentioned previously in that I have two CEWPS on a site. I have changed ListPlaceHolders to such as ‘ListPlaceholder2′ etc. as posted in one of the comments above but it is also not loading the custom link. The animated GIF keeps rotating. In this case I am on WSS 3.0, not MOSS.

  26. for multiple lists, you also need to add an incrementing number to the DisplayThisList function name.

    So to change the ListPlaceholder and SourceList id’s and change the DisplayThisList function name to ListPlaceholder1, SourceList1 and DisplayThisList1() and increment that number for each additional CEWP linked list.

  27. Absolutely. Sean and I have worked on a script to address this, it is posted in this comments section.
    Sam, Gretchen and Mats: are you still having an issue, even when using the script shared by Sean? If so, I propose that we set up a SharePoint site to work on this. Feel free to send me an update by e-mail:
    Christophe@PathToSharePoint.com

  28. To all who replied….Thanks. I had a second set of eyes review the script and they found I was missing a “3” from one of the items. Now everything works perfectly!

  29. Anyone know how I could update a URL in a list column and append it with the &source=URL format.

    Ex. If we were using this for an Announcements list, the title column is a link to the individual item. By appending &souce=URL if you click the link, you can read/edit the item and then click save/close and be returned to the URL you specify in the source value. I just do not know how to update the javascript above to append &source=URL to the end of each title fields URL.

  30. Pingback: A simple method to display a list in another site « Microsoft Technology, .Net, BizTalk, Sharepoint & etc.

  31. Christophe, thanks for an excellent and informative blog. I have just implemented your cute calendar solution to a couple of sites within our sharepoint environment then I came across this. This appeared to provide a solution to a problem I am having, we have a school menu that is common for all schools in our authority and I was wanting to produce one calendar and then be able to display it on other site collections. I tried the instructions above and all I get is the green circle with lines moving around it :(

    • The above script works for lists, but as is it won’t work for calendar views.
      Did you try to display the events as a list, and if so were you successful?

  32. Hi Christophe

    One thing that this does not like is working within the Tab environment by Peter Allen at Bit of Sharepoint.

    The combination of looking up lists and the tabbed environment are a perfect match for each other.

    I got it working with one lookup, but as soon as I added in another it did not like it and often displayed the second list in the first lookup.

    Iain

  33. Iain: did you assign specific ids to each list (cf. Sean’s example in the above comments)?
    btw I’ll publish a method for creating tabs this week. I just validated that it works fine with this script.

    • Christophe,

      I agree with Iain. I have been trying to use the Tab feature mentioned by Peter Allen. The Tabs work great and I can get one list to display under a tab but I can not get a 2nd tab to display a different list. I have attempted to change the ID’s but have had no luck. Does the WebPartWPQ need to be a 1 or 2 or??.. I think this would be a great feature. I would really appreciate your input on how to make this work. Thank you very much.

      • Iain and Jim: first make sure your scripts work without the tab feature. Again, see the script in Sean’s comment that should work as is.

        Also note that I have just published today a method for creating tabs.

  34. Hey,

    I am having some problems getting this to work correctly. I have included the code above in a CEWP and it does not seem to work.
    I changed the url to the list I wanted, and added in the link to my local version of jquery… yet when it loads the green spinner dissapears and then shows nothing. Just blank.
    Any ideas?

    Many thanks,

  35. Sam, Gretchen, Mats, Jim and all: there was a “3” missing in the code proposed in Sean’s comment. I have corrected this and the script should now work for multiple lookups.
    It should also play well with the Easy Tabs Web Part I just released.

    Special thanks to Iain for sharing his test page with me, and bugging me until I get this issue resolved ;-)

    • Hey!
      Chris your site is fantastic. I really appreciate the work you are doing. All the tips and things you are working on are perfectly useful in a real world.
      Did you get a chance to work on recreating the list html code to show even the lists with categories and sub categories and hpw about attachements added to the list. I think this will really make the tool more useful?

  36. Pingback: The Content Query Web Part « Path to SharePoint

  37. What some of the about may be having problems with is the code only allows lists, not webpart pages stored in a document library (for example). I had to learn this one the hard way. But, speaking of this limitation, Christophe, can you think of anyway to modify this code to bring in webpart pages or individual webparts from those pages and not just lists?

    • Aaron, any reason why you would need to pull content from a custom Web Part page, instead of the original list?
      That said, it should work. You’ll need to identify the correct id of the Web Part you want to retrieve. It will be of the form WebPartWPQi, where i is an integer.

      • Long story, shortened.. I’m creating individual lists that are set up as a scorecard with several calculated columns to automatically total each criteria. The scorecards are set up in a datasheet view which allows the calculated column to be totaled, but of course, in a standard view, they can’t without some extra code. So, in a webpart page, I’m displaying a list and a CEWP that not only adds the code to total the list view but also displays the total in a div with google’s chart api. What I want to do is pull the charts from the CEWP to another page in order to do side by side comparisons. I’m thinking that I may have to bring in all of the lists, hide them and customize my code to target the correct WebPartWPQ.

  38. I see in your post that you can’t go across domains. Could it be security related? Any idead on how to make it work?

    • Absolutely Sara, this is a JavaScript security limitation. I won’t advertise any way to make it work, but you’ll find on the Web temporary hacks or browser specific workarounds (search for “cross-site scripting” or XSS).

  39. Thanks for the post, but I am having an issue with the code. When I change out the dummy code with mine in the CEWP and hit apply, the web part just sits there with the green loading sign. There is no way it should take this long to load, in my mind, any ideas of what could be going on?

  40. This is a really great tool, but is there a way to make it work with “blog” style posts? I want to display the Posts element from another sharepoint site in a web part. I can display a view of the Posts from that site using this tool, but I cannot get it to format them the way it does on a sharepoint “blog” type page.

    Any ideas?

  41. This is great. Have you or anyone else found a solution for grouped lists? I was able to bring up my list but they are grouped so I can’t unexpand my list so its taking up alot of my screen. Is there a way to incorporate this with grouped lists so it will allow for expand/unexpand?

    Thanks
    v/r
    JShidell

  42. Great site, its very helpful!

    Just wondering if there is any way to do a roll up of mulitple lists from different sites? I have seen webparts that can be purchased, but this isnt an option for us.

    • The standard roll-up tool is the Content Query Web Part (in MOSS).

      It may be easier to do it the other way around: create a Master list for a site collection, and filter it for each site. You can then use the technique described in this post, or use the method described by Mark Miller at endusersharepoint.com (his examples are for calendars).

      • Hi, Christophe,
        One thing I notice in using this to display lists from another site, like a Contacts list, is the entire list is brought back. Now, if you have 2000 items it stalls out. It works fine for small list views.

        How can you limit what it shows (say, 25 items at a time) and be able to click on a “Next” “Previous” button or some such thing?

  43. @JShidell and Tom: these are the limitations of the method, it seems difficult to keep the onclick events.
    Another approach is to use a Page Viewer Web Part (or iframe), this will keep all the functionalities. Some JavaScript/jQuery magic will help filter the selection and resize the Web Part to fit its content.

  44. Hi Christophe,

    This works really well for me for most lists, but InfoPath form library lists don’t seem to work. I can’t see why the list type would affect this code – any ideas?

  45. Similar to Sam, Gretchen, Mats – I cannot save source editor changes in my CEWP. I had it working the first time I tried – I had a script to edit a field on my calendar list form – but when I tried to change my script at a later date it wouldn’t save.

    Based on Sam’s comments, I thought the problem was that I had created two CEWPs which was causing the problem. I’m pretty sure I deleted all existing CEWPs, however I still cannot save when I make a new one.

    Anyone else ever had this problem or know what could be the problem?

    • Recycling the App Pool is a recommended solution when getting the error ‘”cannot retrieve properties at this time”, but I’m no SP admin. I just am using out of the box stuff with design access and trying not to break anything.

  46. Thank you for all the help. I was wondering if you could point me to some documentation that will help me understand the displaylist. removechild block of code. I was able to get this to work on a blank page, but had problems when I tried to put it on a page with lots of web parts.

  47. Thanks for the solution. I was wondering if you want to (view and) filter the master list based on variable (say Project Name) in the another share point site (project workspace) – how can you do this?

    Basically, we want to create a master SharePoint List in Project Server 2007 (Project Web Access > Create > Custom List) and view and filter that list in various project workspace sites?

    Avi

    • With this method, you could create multiple views of your Master list, each filtered for a specific project name. Then make each workspace point to its specific project view.

      • Thanks Christophe! Is “creating of multiple views of your master list” a manual work around? If you have 100+ projects, that might not be practical.

        Hopefully, you can point me to a way where we can dynamically filter the master list (using a list column name) in project workspace.

        The way I see this work is:
        1) Create Master SharePoint site with a SharePoint list
        2) Create Project workspace template where cewp points to the SharePoint list (in the master sharepoint site) and filters on project name column based on the project name of the workspace.
        3) Each Project created will by default use the project workspace template site and have the cewp which will have list rows relevant to their project.

        Let me know what you think and how can we use the existing solution for the above,
        Thanks a bunch!

        Avi

  48. Is there a way to do so with a login and password required?
    I mean, in my case the only way to get to the list is using a login and password which I have. Is there a way to pass that information through any script so we get permissions to get the content?

    Hope I’m clear and thanks in advance

  49. In my case, I’m getting a permission denied when using getElementById(‘WebPartWPQ1′).

    I’m using the iFrame method and thought the error would be because first time I tried was from two different domains.

    Now I have my sharepoint on a specific url (lets say: http://mywebservice/Pages/Default.aspx) and I’m trying to access from http://mywebservice:8088/ for instance. I use a different port so I don’t know if that is causing my problem.

    Everytime I was running the code I gas getting Login failed. But then I realized that the problem was because it wouldn’t let me get the element Id WebPartWPQ1.

    Please let me know if anyone has a solution or has dealed with this before.

      • Thought so. Thank you very much for your response, Christophe.

        I was wondering, in php I know I can read a website as if it were a file, and maybe from there I could get the WebPart from the list I am trying to get.

        Do you think this idea could work? And I am not very familiar with ASP, but would it be posible to work that way?

        I mean, instead of loading the site with an iFrame, and then loading its webpart into a container, I could try loading the site using php for instance, and with the same php get only the webpart and then print it on a container.

        Have you tried something like this before?

        I’m looking forward to receive your opinion about this idea.

        • Your idea could work.
          There are workarounds using JavaScript/jQuery, search the Web for “cross-site scripting” or “XSS”. You can also try other combinations, like jQuery+Flash. It’ll be easier if you own both the source and target pages.
          Also, the next generation of html/scripting languages should make it easier to access cross-domain content.

  50. Excellent post. It is really what i am looking for. Simple and quick and works!

    Quick question, Chris, how will this approach be effected by the next SharePoint 2010 release? Any ideas, I just want to make sure this could be compatible before leveraging in our project.

    Thanks
    Bill

    • Bill, such methods are at the end of the rendering chain, so I can’t answer any SP 2010 question until we have the final release.

      My view is that this method is a workaround for occasional road blocks. There are better ways (RSS, Web Services) if you need to leverage cross-site communication.

  51. Hmmm… I just used the XML Web Services across site collections for the first time in SharePoint 2007. No problem there. Could it really still be possible to aggregate information across site collections this way? Too easy!

  52. Hi, I tried the original code posted on Jan 22, 2009. However, in my case, the code just hung there. what could be causing this? I am using this code on an internal company site. Could it be something that the company IT dept. set a limit on?

    Thanks.

    Richard

    • I solved the problem. I didn’t realize that I need to use “WebPartWPQ2″.

      However, another question I have now is whether I can show the list in datasheet view. When I tried to have the source pointed to a list in datasheet view, I got the following error

      “The list cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled. ”

      Since I am not a programmer, could someone tell me what this error could possibly mean?

      Thanks a lot

      Richard

  53. Great Post. Really it’s nice and useful information.

    My scenario is little bit different, both of the above ways are not working for me, I am getting “Loading failed” into first way and in second way nothing is coming, I have source list into different site collection which is under different web application, Is it possible to display list data if my source list is residing into another web application-site collection?

    Thank you very much in advance.

    Thanks,
    Sanket Shah

  54. I am very interested in using the Fisheye technique on our SP site. I read through this information and there isn’t anything here or on the Fisheye page to really get me over the hump on this. Can you please help? What am I missing?

    Thanks – Julie

    • Like Julie, I too am very interested in making the Fisheye (aka dock view) work on my SP sites. I can not seem to find the info to make it happen. Can you point me in the right direction?

  55. Does this work for Document Libraries? I need a way to display a libray from one site onto another. The page view webpart, while it works, just doesn’t look clean. Any ideas?

  56. Hi,

    I tried to do this on my sharepoint site. I have used the jQuery version. Once completed, i reloaded the page and i can see that the green loading gif is showing but nothing after that. Will you be able to tell me what i am doing wrong ? I am trying to add a view from one list on the same Sharepoint server.

    Thanks

    Aravind

  57. Thanks for the wonderful post. The iframe version works perfectly, but jQuery version did not work for the same list. I am having same problem as Aravind, only be able to see the green loading image. Hope you have new script out soon. Thanks a lot!

  58. Pingback: How to display SharePoint list from another site | WebGuru’s Blog about Digital Life

  59. Is there a way to display a list that is a datagrid? I would like for the user to be able to update list column values via the datagrid.

    Thanks

  60. This is working perfectly for me..
    but my homepage contains a lot of other stuff, so I would like to restrict the Text in the blog post body to 200 Characters.
    How can I do that.
    Please help me in finding out a solution for this

  61. Great post, unfortunately i get the “Loading failed” error, any ideas? Thanks.


    function DisplayThisList()
    {
    var placeholder = document.getElementById(“ListPlaceholder”);

    var displaylist = null;
    var sourcelist = document.getElementById(“SourceList”);

    try {
    if(sourcelist.contentDocument)
    // Firefox, Opera

    {displaylist = sourcelist.contentDocument.getElementById(“WebPartWPQ1″) ;}
    else if(sourcelist.contentWindow)
    // Internet Explorer

    {displaylist = sourcelist.contentWindow.document.getElementById(“WebPartWPQ1″) ;}
    else if(sourcelist.document)
    // Others?

    {displaylist = sourcelist.document.getElementById(“WebPartWPQ1″) ;}
    }
    catch(err) { alert (“Loading failed”);}

    displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);
    var allDescendants = displaylist.getElementsByTagName(“*”);
    for (i=0;i<allDescendants.length;i++) {
    allDescendants[i].removeAttribute("id");
    allDescendants[i].removeAttribute("onclick");
    allDescendants[i].removeAttribute("onfocus");
    allDescendants[i].removeAttribute("onmouseover");
    }
    placeholder.innerHTML = displaylist.innerHTML;
    }

  62. Hi Chris

    Is there a way to display calender as calendar view from a sub site to the main site. I tried Content Editor Web part but it shows as a link and does not display the calendar. Is there a code.
    Please help

    • So you’re saying that the code proposed in this post didn’t work? Well it should, although you might need to tweak it a little to make the calendar view look good.

  63. Should this work from one farm to another as long as they are in the same domain? I’ve had success across sites within the same farm, but not between different farms. Thanks.

  64. Yes it does thanks. This would be a case of farm1.domain.com and farm2.domain.com . Do you know of any solution that works between seperate farms/hosts within a domain?

    • Jeff, see my reply to Sara above.

      If you really need a client side cross-domain solution, you’ll certainly have to turn to another option, for example JSONP or a combination of Flash and JavaScript.

  65. Fantastic solution Christophe! I do have a question though, if a user doesn’t have access to the list it is pulling, then it won’t load in the CEWP, correct? For example, I work at an Aerospace company and we have 2 sites for each program (an Internal site for employees, and an External site for suppliers). The suppliers don’t have access to the internal site for obvious reasons, but the internal site is where we keep a RAIL (Rolling Action Item List) for the entire program. Some items on the RAIL are internal only, and some are collaborative items…we don’t want the suppliers to see an internal only action item. So what we have done is created a view on the list to show action items which are ok to view for external people (suppliers, customer, etc) and the “External_View.aspx” is what is used in teh code in the CEWP. I can view the CEWP just fine on the External Site, but when a supplier loads the page it says “loading failed” which I assume is due to them not having access to the internal site. Is there any way to get around this that you know of? We would really like to get away from the current solution of having an Excel Spreadsheet using a query of the list to automatically populate a workbook because then there is just too many versions of this RAIL going around and everyone thinks THEIR version is the correct version.

    Thanks for anything you might be able to think of!

    • Ryan: I think your analysis is correct, they can access individual items but not the container.
      I’d say that a funnel approach makes more sense: put the list where everybody has access (the suppliers site), and restrict permissions for the internal items.
      Or maybe you could try with two folders, internal and external, and set up permissions at the folder level (not tested).
      Web Services, as described by Ricky below, or the URL protocol could work too, but it’s more work and customization.
      If both sites are in the same site collection a Data View Web Part could work too.

  66. Same situation here with the added challange of showing Append Only comments expanded out. Our “partners extranet” is nothing more than another site collection in our deployment.
    I ended up adding a yes/no column labled Show on External, created a view filtering on this column, created a custom master page and custom edit form that lives on the partners site using jPoint to handle the web service calls for updates, and the form is shown in a modal dialog. Add in a huge amount of jQuery and the end result is a completly obfusticated display of action items.
    I really should write up how i did that, as getting the append only comments to expand out was a challenge, given that each comment is stored as a version of the list item.. So rather than deal with versions, I cheated, and simply pulled it out of the display item form.

  67. Hallo
    i tried to add a column with traficlights to a view as you described above.
    But it still does not display a green, red, etc. button. Do you have any idea how i can solve the problem?
    Daniela

    1. ) create the column
    =”<SPAN style='font-size:24px;font-weight:bold;color:
    "&IF([Status]="D-Not relevant","Green",IF([Status]="C-Completed","Green",IF([Target Date]•”

    2.) Create a CEWP with the following content:

    /*
    Text to HTML – version 2.1.1
    Questions and comments: Christophe@PathToSharePoint.com
    */

    function TextToHTML(NodeSet, HTMLregexp) {
    var CellContent = “”;
    var i=0;
    while (i < NodeSet.length){
    try {
    CellContent = NodeSet[i].innerText || NodeSet[i].textContent;
    if (HTMLregexp.test(CellContent)) {NodeSet[i].innerHTML = CellContent;}
    }
    catch(err){}
    i=i+1;
    }
    }

    // Calendar views
    var regexpA = new RegExp("\\s*\\s*”);
    TextToHTML(document.getElementsByTagName(“a”),regexpA);

    // List views
    var regexpTD = new RegExp(“^\\s*\\s*$”);
    TextToHTML(document.getElementsByTagName(“TD”),regexpTD);

    // Grouped list views
    ExpGroupRenderData = (function (old) {
    return function (htmlToRender, groupName, isLoaded) {
    var result = old(htmlToRender, groupName, isLoaded);
    var regexpTD = new RegExp(“^\\s*\\s*$”);
    TextToHTML(document.getElementsByTagName(“TD”),regexpTD);
    };
    })(ExpGroupRenderData);

    // Preview pane views
    if (typeof(showpreview1)==”function”) {
    showpreview1 = (function (old) {
    return function (o) {
    var result = old(o);
    var regexpTD = new RegExp(“^\\s*\\s*$”);
    TextToHTML(document.getElementsByTagName(“TD”),regexpTD);
    };
    })(showpreview1);
    }

  68. Great Post, the Jquery did the trick. Thanks! One question; is it possible show the displayed list in its summary view?

    Thanks!!

  69. I’m using the new 2.0 version code to link to a parent site’s form library (InfoPath) from a child site and everything is working great except 1 thing. I have the Name (linked to document) and the Type (icon linked to document) displayed in the view and when these items are clicked on the parent site they are opened by InfoPath form services. However, when these links are clicked on the child site they are trying to download themselves instead of automatically open in the browser enabled form mode.

    Working link example:
    http://MyTestSite.com/New%20Requests/jpeak-2010-7-26.xml

    Not working link example:
    http://MyTestSite.com/New%20Requests/jpeak-2010-7-26.xml?Source=http://MyTestSite.com/Level1/SupportLib/TestLinkPage.aspx?PageView=Shared

    It’s obviously either the Source or PageView parameter passed in the query string, but I was wondering if you could advise on how to remove this portion from the URL.

  70. I am having problems pulling from my main calendar. I think it is because I am confused. I put all the information into the form and it gave me the code. I put that into a CEWP using source. It doesn’t work. Do I need to also add in some html? I am new to java script so I really don’t know. Any help would be greatly appreciated.
    Lisa

    • Lisa, which jQuery option did you select in the form? If you selected a CDN, you need internet access to make it work.
      Also, see the limitations mentioned in the post.

  71. Hi Christophe, I tried your solution in combination with a poll. When hitting the “Vote” button, the Graphical summary of responses should show on the page. (just like in PatCharles’ article, see: http://www.endusersharepoint.com/2010/04/22/create-a-polling-web-part-with-sharepoint-designer-and-the-dvwp/).

    Unfortunately, I did not succeed. Since I copied the code and added the URL to the responses page (http:….//Lists/Poll/summary.aspx), I wonder what am I doing wrong? Page contains 2 web parts, for the poll and for the results. I am using SP2007 MOSS.
    thanks,
    Claudia

  72. hi chris,

    thanks for the code, it was absolutely a charm,
    just a quick question, can i control the number of displayed items in the list say i have 200, i just wanted to display 3, is it possible..

  73. Hello,

    I used this script to link to a Document Library. This document library has sub folders in it. The problem is when I click on the sub folders it redirects me to the page in which those folders reside. Is there any way to make it to where it opens the folder within the same webpart that this script is running in? If so please tell me how. Thanks!

    Justin

    • This would not be easy. In the latest version, I renamed this solution “snapshot”, because that’s really what it is. Advanced features are lost, only the look and the hyperlinks are kept.

  74. Is it possible to use method in SharePoint 2010? I try but nothing loads, only the “gears” animation going round and round.

  75. I too would like to see if this can be an option in SP 2010. I have yet to find an easy solution to display lists from different site collections in a site. Any thoughts on whether or not this script will be updated to jive with the 2010 version? Earlier in the comments you stated that you needed to wait until the public version was released. It’s out now. Just wondering. Love your work!

  76. Jamie and Erich: I just did a test, and it worked fine for me on SharePoint Foundation. Here is what I did:
    – Choose a list:
    http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/Pages
    – Run the script generator (I selected wss v3):
    http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/Pages/Cross-Site-List-Snapshot.aspx
    – Here is the result on another site:
    http://sp2010.pathtosharepoint.com/Portfolio/Pages/Cross-Site-Snapshot.aspx

    I’d suggest that you try again with the script generator, and let me know the result.

  77. I am using Sharepoint 2010 Enterprise and am running into the same issue that Jamie mentioned? All I see is the Gears turning. Is this compatible with SP2010 Enterprise?

      • Hi Christophe,
        First of all thanks much for a wonderful blog. i have bookmarked it. The solution above works like a charm.I have a question regarding the above solution. Can we have the toolbar (new /actions..) of source list to be displayed in the target list?

        Thanks Much.

  78. Thanks Chris – I am looking for toolbar because what i need is users should be able to view and add items from both the sites …

    Thanks again-

  79. I tried to use this on a 2007 SP site and the gears just run. I tried the iframe and JQuery. Any advice?

    • Right. This method will keep the look and structure of the list, including the hyperlinks (html a tags). But the scripts won’t be carried over to the new site.

  80. Hi All..

    Nice and simpple code, if I could just get it to workunder Sharepoint 2010 Enterprise.

    I have a summary view (yet the other 3 views dont work either), and I have put the code into a Content Editor Webpart.

    The list seems to load, but I get NO list displayed.

    However, there is a Green PLUS with text ADD NEW ITEM and this links to the correct list.

    Any ideas? I noticed someone had the same issue, but never got a reply.

    Thanks,
    Rob

  81. The problem with SharePoint is that the ‘blog’ feature works like a subsite but we want the blog posts to show up on the parent page.

    Is there a way of creating a web part on the parent page that will take in the RSS feed from the blog?

  82. Hi Christophe, I am trying to have a SP 2007 page with this script, show a view of a list from a SP2010 list. Should it work? Can it? Here at work they have a crazy setup where they use 2007 for their intranet and 2010 for our personal dept sites. I want to display a list view from our dept site (2010) on the 2007 intranet version.

      • Ok thanks Christophe, just tried the page viewer and it looks ok so will use that as a workaround. Glad i’n not alone :-)

        • Nope you’re really not alone. Also in need of displaying a SP2010 list on a SP2007 page.

          Is there any new hope to avoid the Page Viewer Webpart?

        • If you are interested, there are techniques in JavaScript that allow cross-domain communication (messaging, CORS). This area is evolving quickly and I couldn’t point you to the latest news. I don’t plan to publish any such solution either, because of the security risks involved with such scripts.

  83. Sorry – I tried to go through all the comments, but there are so many…..

    Do you have a code update that allows you to put two different CEWPs on the same page, but showing to different lists?? If I try – it just gives me the gears. I can’t only do one per page…..

    • I updated the code to accept a div ID and iframe ID. I then put it in one CEWP at the top of the page with this code

      function DisplayThisList(listP, sourceL)
      {
      var placeholder = document.getElementById(listP);

      var displaylist = null;
      var sourcelist = document.getElementById(sourceL);

      try {
      if(sourcelist.contentDocument)
      // Firefox, Opera

      {displaylist = sourcelist.contentDocument.getElementById(“WebPartWPQ2″) ;}
      else if(sourcelist.contentWindow)
      // Internet Explorer

      {displaylist = sourcelist.contentWindow.document.getElementById(“WebPartWPQ2″) ;}
      else if(sourcelist.document)
      // Others?

      {displaylist = sourcelist.document.getElementById(“WebPartWPQ2″) ;}
      }
      catch(err) { alert (“Loading failed”);}

      displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);
      var allDescendants = displaylist.getElementsByTagName(“*”);
      for (i=0;i<allDescendants.length;i++) {
      allDescendants[i].removeAttribute("id");
      allDescendants[i].removeAttribute("onclick");
      allDescendants[i].removeAttribute("onfocus");
      allDescendants[i].removeAttribute("onmouseover");
      }
      placeholder.innerHTML = displaylist.innerHTML;
      }

      Then I added a CEWP for each list that I wanted to display like this:


      http://…/AllItems.aspx

      • Let’s try this again :)

        1) I updated the code to accept a div ID and iframe ID. I then put it in one CEWP at the top of the page with this code

         <script type="text/javascript">
        function DisplayThisList(listP, sourceL)
        {
        var placeholder = document.getElementById(listP);
        
        var displaylist = null;
        var sourcelist = document.getElementById(sourceL);
        
        try {
           if(sourcelist.contentDocument)
              // Firefox, Opera
        
              {displaylist = sourcelist.contentDocument.getElementById("WebPartWPQ2") ;}
           else if(sourcelist.contentWindow)
              // Internet Explorer
        
              {displaylist = sourcelist.contentWindow.document.getElementById("WebPartWPQ2") ;}
           else if(sourcelist.document)
              // Others?
        
              {displaylist = sourcelist.document.getElementById("WebPartWPQ2") ;}
        }
        catch(err) { alert ("Loading failed");}
        
        displaylist.removeChild(displaylist.getElementsByTagName("table")[0]);
        var allDescendants = displaylist.getElementsByTagName("*");
        for (i=0;i<allDescendants.length;i++) {
        allDescendants[i].removeAttribute("id");
        allDescendants[i].removeAttribute("onclick");
        allDescendants[i].removeAttribute("onfocus");
        allDescendants[i].removeAttribute("onmouseover");
        }
        placeholder.innerHTML = displaylist.innerHTML;
        }
        </script>
        

        2) Then I added a CEWP for each list that I wanted to display like this:

        <DIV id="ListPlaceholder7"><IMG src="/_layouts/images/GEARS_AN.GIF"></DIV>
        
        <!-- Paste the URL of the source list below: -->
        <iframe id="SourceList7" style="display:none;" src="../AllItems.aspx"
         onload="DisplayThisList('ListPlaceholder7','SourceList7')"></iframe>
        
        
  84. Chris – I thoroughly enjoy your articles. You are a great explainer! The reason I landed on this page is that I’m looking for a type of ‘notify me when this document changes’ alert. I’ve used the alert route but my teamsite only refers to our global address book. I need something that can send a msg w/the URL of the doc that changed so my mgr can just click on it and it will take him to that doc. I have a top site (where I’d like the notification to reside – maybe put it in Announcements) and 6 subsites with various document libraries…all that would need this notification mechanism. Can you help?

    And thx in advance for any direction. I’ve only been head site admin for 7 months so ANYTHING will help me.
    Lisa

  85. I used Michael Brown’s script above to try and load more then one sharepoint list from one page to another page.
    1. I made a CEWP with the top script and hide it.
    2. Then I made a second CEWP with script #2 (worked well).
    3. Then I made a third CEWP with script #2 again, this time trying to show a different list. it didn’t work at first. I kept getting the “spinning gears”

    I found the problem, when you use script #2 a second and/or third time, you have to change the numbers in the script for ‘SourceList’ and ‘ListPlaceHolder’. I made them all #8 and #9 for yet another list.
    Now all three lists show up on the same page and its all information from different lists on different pages.
    I put all that below the easy tabs and my page is now great and lists all the information I need.

    Thanks Chris and Michael, please keep up the good work for all us “struggling” web designers.

  86. Love this technique – Anyone able to confirm whether it works on Sharepoint Enterprise 2010 – At the moment I just get the gears spinning

  87. To make Christope’s original code workable in SharePoint 2007 and 2010, Just replace a line of code with an additional four lines of code as mentioned below. It works in SharePoint 2007 and 2010. (Single version code).

    Old Code:
    displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);

    Replace With:
    if (typeof _fV4UI == “undefined”)
    {
    displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);
    }

    Just find the old code line in the code block and replace with above metioned replacement code.

    Thank you Christope!

  88. I’m trying to display a discussion posts from a discussion board on a subsite. A CQWP takes you to a form, not the discussion post. Do you have a solution for that?

  89. Anyone figure out how to use this code on a different domain?

    We use SharePoint for collaboration and also have Interwoven Web Content Management System for our intranet (both internal but different domains). I am looking for a way to use the code you provided on your site, to not only include a list on a SharePoint site, but be able to include it on our Intranet.

    Using the code below I get an error because our SharePoint site is secure/requires a login and our intranet does not capture login info.

    On the intranet, whats strange is if I use a normal simple IFRAME code, I can pull in a whole page, but the code below does not work, login error.

    Are you aware of anyone that could have a solution?

  90. Hi @ all!

    I’ve got an script error.

    Line: 1
    Char: 7
    ERROR: Object expected
    CODE: 0
    URL:…projects/770199/_layouts/RTE2PUEditor.aspx

    So what’s wrong?

  91. I followed the directions but I am receiving an error:
    “Invaild character”
    Line 34, Char 58

    I am using SP 2010, IE8

    Here is the code I am using:


    </iframe id="SourceList" style="display:none;"

    src="http://…/AllItems.aspx" onload="DisplayThisList()"

    function DisplayThisList()
    {
    var placeholder = document.getElementById(“ListPlaceholder”);

    var displaylist = null;
    var sourcelist = document.getElementById(“SourceList”);

    try {
    if(sourcelist.contentDocument)
    // Firefox, Opera

    {displaylist = sourcelist.contentDocument.getElementById(“WebPartWPQ1″) ;}
    else if(sourcelist.contentWindow)
    // Internet Explorer

    {displaylist = sourcelist.contentWindow.document.getElementById(“WebPartWPQ1″) ;}
    else if(sourcelist.document)
    // Others?

    {displaylist = sourcelist.document.getElementById(“WebPartWPQ1″) ;}
    }
    catch(err) { alert (“Loading failed”);}

    if (typeof _fv4UI == “undefined”)
    {
    displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);
    }

    var allDescendants = displaylist.getElementsByTagName(“*”);
    for (i=0;i<allDescendants.length;i++) {
    allDescendants[i].removeAttribute("id");
    allDescendants[i].removeAttribute("onclick");
    allDescendants[i].removeAttribute("onfocus");
    allDescendants[i].removeAttribute("onmouseover");
    }
    placeholder.innerHTML = displaylist.innerHTML;
    }

    I have the code saved to a .txt file (in the SP library) and have linked through a Centent Editor Web Part
    Any help would be greatly appreciated!

    • I posted the incorrect code the first time, trying again…


      <iframe id="SourceList3" style="display:none;" src="http://…/Today.aspx" onload="DisplayThisList3()"

      function DisplayThisList3()
      {
      var placeholder3 = document.getElementById(“ListPlaceholder3″);

      var displaylist3 = null;
      var sourcelist3 = document.getElementById(“SourceList3″);

      try {
      if(sourcelist3.contentDocument)
      // Firefox, Opera

      {displaylist3 = sourcelist3.contentDocument.getElementById(“WebPartWPQ9″) ;}
      else if(sourcelist3.contentWindow)
      // Internet Explorer

      {displaylist3 = sourcelist3.contentWindow.document.getElementById(“WebPartWPQ9″) ;}
      else if(sourcelist3.document)
      // Others?

      {displaylist3 = sourcelist3.document.getElementById(“WebPartWPQ9″) ;}
      }
      catch(err) { alert (“Loading failed”);}
      if (typeof _fv4UI == “undefined”)
      {
      displaylist3.removeChild(displaylist3.getElementsByTagName(“table”)[0]);
      }
      var allDescendants3 = displaylist3.getElementsByTagName(“*”);
      for (i=0;i<allDescendants7.length;i++) {
      allDescendants7[i].removeAttribute("id");
      allDescendants7[i].removeAttribute("onclick");
      allDescendants7[i].removeAttribute("onfocus");
      allDescendants7[i].removeAttribute("onmouseover");
      }
      placeholder3.innerHTML = displaylist3.innerHTML;
      }

  92. Hi,

    It may be a silly question but I was wondering how long will it take to render the code? Mine takes more than 30min…is this normal? (ps. i am not a developer!)

    Cheers, Ali

  93. Pingback: A simple method to display a list in another site « Path to SharePoint

  94. This is brilliant. Much easier than setting up a Data View Webpart, especially when I had to render the content on multiple subareas.

    I just incremented WebPartWPQ1 to WebPartWPQ2 to accommodate MOSS and things looked great! Thank you.

  95. This is what I was exactly looking for. But it does not work for me in SP 2010. I have uploaded the source text file into a library. When I click on the text file itself, it is displaying the list from another site without any issues. But when I refer to this source file in a CEWP on a page within the same site as the library, it does not display anything. No error too. I checked in the page after the changes. What am I missing ?

    Thanks.

    • Hi there,
      I have same problem, but my text file does not work even when I try to open itself. I get gear*.gif for a sec and then nothing happens. I try to display calendar from one site to another within one site collection. I am really new in this so any help would be appreciated. I working with Shp Foudation 2010, if i helps.

      Thanks.

  96. Pingback: Want to display a SharePoint list from another site collection? Use these 2 lines of jquery script! - Balestra

  97. Great article ! Your site has helped me often building nice Sharepoint solutions, like the color coded calendar .. But unfortunately I can’t get this one to load my list.. The gear just keeps spinning endlessly..
    Both with the HTML as the Jquery solution

    Is there a limit to the size of the list to load?

    I’ll have a look at the User toolkit, but any advice is welcome.

    • Hi Christophe,

      I like many owe you so much already. Thanks for all your work!

      I work in a WSS3.0 enviroment where DVWP is out of bounds.

      I guess this jquery functionality still cannot use a “Grouped” view?
      When I try it I just get it frozen with a Javascript error on page.

      I have the latest version (I believe) from the User Tool Kit for 2007 which I got here:
      http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Cross-Site-List-Snapshot.aspx#

      Kind Regards,
      Paul

      • Paul, this technique allows to easily pass the html, but passing the interaction is a challenge. That’s why in later versions I have renamed this technique “snapshot”. What do you mean by “out of bounds”?Have you tried the aggregation solutions available in the SharePoint User Toolkit?

  98. Hi Christophe,

    I like many owe you so much already! Thanks for all your work.

    I work in a WSS3.0 enviroment where DVWP is out of bounds.

    I guess this jquery functionality still cannot use a “Grouped” view?
    When I try it I just get it frozen with a Javascript error on page.

    I have the latest version (I believe) from the User Tool Kit for 2007 which I got here:
    http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Cross-Site-List-Snapshot.aspx#

    Kind Regards,
    Paul

  99. Great post! I had to make 3 minor modifications in order to get it to work.
    1)I changed WebPartWPQ1 to WebPartWPQ2 (as noted in previous comments)
    2)Needed to remove this line..
    displaylist.removeChild(displaylist.getElementsByTagName(“table”)[0]);
    3)changed the line after #2 to read ..
    var allDescendants = displaylist.getElementsByTagName(“table”)[0];

    Thanks,
    Harry

  100. Pingback: Display List in Sub Site | All the Goss about SharePoint

  101. Hello,
    i worked with your first solution but i just see new Item button on the page. What did i do wrong? I changed the URL and the WepartWPQ.
    Does anybody have an idea how to handle it? Thanks in advance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s