Modify javascript to display a SharePoint list from another site collection, want items to open in a modal dialog [on hold]
- by FRD
I'm trying to modify the javascript below so that when a list from one site collection is displayed in another site collection and an item is selected, it opens in a dialog box instead of taking over the entire page and forcing the user to the originating site.
<div id="ExternalListContainer"></div>
<script type="text/javascript">
//wait for SP to load up
ExecuteOrDelayUntilScriptLoaded(
function LoadExternalList() {
//turn on xsite scripting support for jquery
$.support.cors = true;
//load the external SP list
$("#ExternalListContainer").load("http://originatingsiteurl.aspx table.ms-listviewtable",
function(response, status, xhr) {
//find all the list items and convert to HTML so we don't see the code
$("#ExternalListContainer").find(".ms-vb2").each(function () {
$(this).html($(this).text());
});
});
}, "sp.ribbon.js");
</script>