Environment: SharePoint 2013

Is it possible using Jquery to show an external link within SharePoint.

Wherein user clicks and it opens the external link in modal view with no address bar, so user doesn't get to know for the page they are accessing is part of another site.

  • Should you provide us more clarification , Are you need to show external link in SharePoint modal pop up? or you need only to show external link within a SharePoint page to hide the external URL ! – Mohamed El-Qassas MVP Aug 1 '16 at 7:19
  • Lpoling for both options.Modal pop up – Jason Aug 1 '16 at 8:17
  • Sorry for typo error. Looking for both options. Preference modal pop up, if not then opening the link with no address bar. – Jason Aug 1 '16 at 8:18

To open External link via SP.UI.ModalDialog you can use the following code

<a href="#" onclick="openInDialog(500,600,true,true
,false,'http://www.SharePoint.com');">MS SharePoint Site</a>

function openInDialog(dlgWidth, dlgHeight, dlgAllowMaximize, dlgShowClose, pageUrl)
var options= { width: lgWidth, height: dlgHeight, allowMaxize: dlgAllowMaximize,
showClose: dlgShowClose, url: pageUrl};



For more details check the main reference

If you need to use Jquery you can also use Fancy box as Iframe, I think this link may help you to use fancy box inside SharePoint

  • Thanks, can u suggest that would allow to view the external link without url. I'm looking for javascript or jquery script. – Jason Aug 1 '16 at 11:56
  • the above is javascript and I also attached jquery , should you tell me what you need specifically , I only tried to help you :) and I think the above answer is at least useful and near to your question as you typed :) – Mohamed El-Qassas MVP Aug 1 '16 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.