Forum Discussion
VISKR05
May 12, 2023Copper Contributor
How to open version history in pop up in SPFx react project ?
Hi All, I have a anchor tag on the page with href = siteurl/_layouts/15/Versions.aspx?list=listGUID&ID=200. This opens in a separate tab. Please help me to open the version.aspx page as pop up to ...
VISKR05
May 16, 2023Copper Contributor
Thank you so much for your reply.
I am able to open IFrameDialog. but please help me how to hide some contents like left navigation when IFrameDialog opens. below is my code:
<IFrameDialog
url={this.state.listGUID}
iframeOnLoad = {this._onIframeLoaded.bind(this)}
hidden={this.state.hideiframedialog}
onDismiss={() => this._closeIFrameDialog()}
modalProps={{
isBlocking: true,
}}
dialogContentProps={{
type: DialogType.close,
showCloseButton: true,
title: 'Version History',
}}
width={'900px'}
height={'550px'} />
//On IFrame load, below code
protected async _onIframeLoaded (){
setTimeout(() => {
var pageId = document.getElementById('sideNavBox');
alert(pageId);
document.getElementById("sideNavBox")[0].setAttribute("style", "display:none !important");
},20000);
};
but it's not working..
I am able to open IFrameDialog. but please help me how to hide some contents like left navigation when IFrameDialog opens. below is my code:
<IFrameDialog
url={this.state.listGUID}
iframeOnLoad = {this._onIframeLoaded.bind(this)}
hidden={this.state.hideiframedialog}
onDismiss={() => this._closeIFrameDialog()}
modalProps={{
isBlocking: true,
}}
dialogContentProps={{
type: DialogType.close,
showCloseButton: true,
title: 'Version History',
}}
width={'900px'}
height={'550px'} />
//On IFrame load, below code
protected async _onIframeLoaded (){
setTimeout(() => {
var pageId = document.getElementById('sideNavBox');
alert(pageId);
document.getElementById("sideNavBox")[0].setAttribute("style", "display:none !important");
},20000);
};
but it's not working..
Deleted
May 16, 2023In the URL, please add the parameter "&IsDlg=1" , if this is present then, sharepoint itself will hide the other areas