Hot answers tagged


This article describes an old trick for making certain links open in a new tab. Just append the url for any link you want to open in a new tab with #openinnewtab, and add the following javascript code (master page would be best): $(document).ready(function() { $('a[href$="#openinnewtab"]').attr('target', '_blank'); });


Write a script to with quoting classnames. get the classname where ever u want to apply this. Here is the example $(function () { $(".classname a").each(function (i) { $(this).attr('_target', "blank"); }); }); Load this script into master page.


Here is another option that doesn't require any added code. If the Edit List Item Link button doesn't have to be above the list in a webpart, you could opt to add an Edit Item icon to a list view itself, and it will be inline on the row with the item. Modify the List View (or the if a webpart on a page, go to > Edit Web Part > Edit current view) In the ...


You can set it like this: oListItem["URL"] = String.Format("{0}, {1}", mainurl, "Description"); It's a simple string and URL value is followed by a description which are separated by a comma. Or you can use a more object oriented approach: var value = new SPFieldUrlValue(mainurl); value.Description = "Description"; oListItem["URL"] = value; Whichever ...


Try this: FieldUrlValue url = new FieldUrlValue(); url.Url = "Your Url here"; url.Description = "Your description here"; oListItem["URL"] = url;


Your best bet, IMO, would be to inject a JavaScript code into the display page of the links list. That JavaScript code would grab the hyperlink value, and use it to redirect the browser. If this suits you, we can try to find the best way to 1. inject the JavaScript, 2. and implement that JS code. [EDIT] 1. Can be achieved by editing the dispform.aspx ...

Only top voted, non community-wiki answers of a minimum length are eligible