0
votes

I have a query regarding sharepoint list views. I have a list, a SharePoint page 'A' with two views of that list and another SharePoint page 'B'. On page 'B' i have some script and i will have two links and both of them will redirect me to SharePoint page 'A'. But there is a twist here. As mentioned before, i have two list views on page 'A'. So if a user clicks on first link on page 'B' then he will be redirected to page 'A' with first list view but if he clicks on second link then he will be redirected to page 'A' with second list view. It means he will be able to see only one view at a time. (in reality i will be having 21 links on page 'B' and 21 views of lists on page 'A'). So is there any way that can be achieved? Also i am new to SharePoint development as well. So please share the code in detail if there's any.

Thanks.

1

1 Answers

0
votes

We can open page "A" from page "B" as a model dialog, and we don't need to redirect page "A" multiple times when click the links in page "B".

function openModelDialogPopup(strPageURL) {  
    var dialogOptions = {  
        url: strPageURL,  
        title: 'ModalDialog',  
        allowMaximize: false,  
        showClose: true,  
        width: 800,
        height: 330  
    };  
    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', dialogOptions);  
    return false;  
}  

More information:

How To Open SharePoint Application Page In Modal Dialog (Popup) Using JavaScript

Open Pages and Forms in Modal Dialog For SharePoint 2013