Azure IoT Solutions

Azure based IoT Hub solutions for devices with .net IoT Core SDK

Hybride Apps

Hybride Desktop & Smartphone Apps with IONIC, Sencha and SAPUI5

Android native

JAVA and XAMARIN based Android native Apps

IOS native

SWIFT, Objective C or XAMARIN based IOS native Apps

Home

Open Sharepoint link URL in new tab or window with jQuery

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 
reason: if you use a link or multiline column in a SP List and type in a web-url, by clicking it on, the new url will be loaded in the parent window as your SP Collection or portal is. To avoid this behaviour e.g. the url begins with http or www  can be loaded in a new window or browser tab. 

solution:  open the SP Designer and select the appropriate SP list you want to extend with this functionality. Select the default view or another by right-clicking an open that in advanced mode.  

and place the following code after the content place holder main don't forget to download and/or register jQuery !!!!:

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" src="/Scripts/jQuery-1.11.0.js"></script>
<script type="text/javascript">
 
$(document).ready(function() {
 
$('a[href]').click(function(){
var link = $(this);
var url = link.html();
//Link contains http or www or something else......
if ((url.indexOf('http') !== -1) || (url.indexOf('www') !== -1))
{ 
window.open(this.href);
return false;
}
});
});
<br></script>

Print Email

Strips B - main bottom

  • Simple Item 4

    dsfadsfafds f asdf as df asdf dsa fa f a sdf asd f sadf
  • Simple Item 3

  • Simple Item 2

  • Simple Item 1

  • 1