How to open a hyperlink in new tab from document library

hi,
I have created a Document library programmatically.
Added values to columns programmatically. One of the column contains a hyperlink.
I need to open a new tab when a user click on that link?
How can we do it?
i cant add CEWP cause there may be libraries above 200 so i cant add CEWP in every lib.
can we make it programmatically or any library seetings?

<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script>
$(function() {
$('a').filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).attr('target','_blank');
</script>
Place the above script in the master page.So that it is applicable for all the libraries.
Find other solutions @:
http://www.sharepointdiary.com/2011/02/sharepoint-link-list-open-in-new-window_21.html#ixzz2I939sGDr

Similar Messages

  • How to open Bing in a new tab?

    I know that most people are looking for the way how to remove Bing from a new tab, but I want to make a vise versa :) I have already found the way how to set up Firefox to open Bing in a new tab. But what I miss - is the position of the cursor. It stays on URL bar. But I would like it to stay in searching bar of the Bing. Is it possible to make it?
    Thanks!

    Hello there,
    You'll need to make "bing" your default search engine. http://www.bing.com/set/search
    Hope this helps!

  • How to open navigation item in new tab?

    Hello
    Is it possible to open a navigation item in a new tab?
    for example, when a user enters in MII and in the menu has several links, is it possible, when clicking in a link, to open it  in a new tab?
    i know it is possible to open in a new window or in home page or on top... but what about tab?
    Best regards.
    Edited by: Ricardo Alves on Dec 4, 2009 5:53 PM

    Your solution will be client setting dependent.  The home page navigation and tab options for opening in the frame or new window are merely setting the href target in the home page html when the screen is rendered by the personalization service.  As far as I know the tab behavior new to IE in version 7, and the tab behavior in other browsers like Mozilla/Firefox are both managed at the application level and will be client PC bound.  The home page process just uses target="_blank" for opening links in a new window.  I don't know if there is a browser neutral setting for something like target="_newtab", but it doesn't appear to be the case:  http://www.w3.org/TR/html401/types.html#h-6.16
    If something like this does creep into the standard then it would make a nice feature enhancement request for 3 radio button options when defining a link in the navigation editor.

  • Visio Web Drawing opens all hyperlinks in new tab

    Hi,
    I created a diagram in Visio 2013 Professional. I saved the diagram as Visio Web Drawing to a Sharepoint document library. I use the web part Visio Web Access to display the diagram on a SharePoint page. The diagram contains some hyperlinks to other
    SharePoint pages. However all the pages opens in a New tab.
    How can I make the hyperlinks to open in the same window?
    I set the Hyperlink.NewWindow property as FALSE in Visio, but it doesn't matter. It still opens in New tab.
    I tried to make one hyperlink to another Visio page (in the same Visio file) by selecting sub-address, and this opens in the same window. If I make the hyperlink by paste the url to the SharePoint page in the Address Field, it opens in a New tab.
    Can anyone help?

     It is by default that SharePoint 2013 Visio Service deals with  the hyperlink of Visio document. There seams to be no approach that Microsoft Visio keep the same location when it follows a hyperlink to open a Web page.
    Reference:
    http://msdn.microsoft.com/en-us/library/office/ff767738(v=office.15).aspx
    Courtesy:
    Wendy Li
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • New website overwrites previous tab--how to open it in a new tab?

    When I open a new website, rather than opening a new tab, it takes the one that's already open. How can I make it open in a new tab?

    You can click on the link or bookmark using Ctrl+click or Ctrl+Shift+click.
    One of them will open in the foreground in a new tab the other in the background into a new tab. Depends on your options settings.
    Some items you might want to set in '''about:config''', see Firefox configuration variables relating to clicking on a link or on a bookmark. (#newtab)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm#newtab
    You might want to try these settings in your about:config as described in the above link.
    :'''browser.search.openintab''' user set '''true'''
    :browser.tabs.loadBookmarksInBackground default false (***)
    :browser.tabs.loadDivertedInBackground default false
    :browser.tabs.loadFolderAndReplace user set false
    :browser.tabs.loadInBackground user set false (***)
    (***) you want these two to have the same setting so opening from a link will be the same as opening from a bookmark or opening from history.
    Google Search results > upper right corner gear/settings:
    Results Window: [x] Open search results in a new browser window.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • How to open newweb address in new tab

    when we are opening the firefox new tab is displaying but when we are trying to type web address in that it is not taking the wed address.where we have to type web address? how to open the new website?

    I have that option checked and use that function all the time. I'm wanting my search from the search bar to open in a new tab, not the existing page. Command - click only works if you click on a link within a page.
    Thanks for replying.

  • How to open external links in new tabs?

    I own a personal web site. A question is
    How to open external site in the new tab? For example: the THIS LINK will open new window. How to open new tab in Safari for this case?
    Thanks for answer.

    Morning Igor and welcome to the forum.
    I assume that you are talking about enabling the tabs in the preferences of safari:
    Preferences, tabs, open new windows in tabs (I believe this is how it is written.. not in front of my mac).
    Hope this helps...
    Steff

  • How to open URL in a new tab? NOT in new window!

    Dear All,
    I am a newbie to Flex and this is my first application here. Kindly forgive me for the ignorance.
    I have a tabbed pane created using ViewStack. When the user click a button on the first tab, an external URL has to be invoked in a new tab. I have written this function which successfully creates the new tab but when I try to open the URL using navigateToURL it opens in a new window:( What I need is to open the URL in the newly created tab. I have tried out navigateToURL parameters such as _self, _blank, top etc but none seems to work out. Could anyone kindly let me know the standard way to do this? is it ExternalInterface or ModuleLoader or something else? Please give me some references that would help me do it. I am trying this for quite some time now but no luck . Thanks a million in advance.
    protected function button2_clickHandler(event:MouseEvent):void
        var newVBox:VBox = new VBox();
        var newLabel:Label = new Label();
        newLabel.text = "Hotspot Mngmt panel";
        newVBox.label = "Hotspot Mngmt";
        /* navigateToURL( new URLRequest( "http://ipmsit.tsmc.com.tw/Hotspot/Hotspot/index.html" ), "_self" );*/ --opens in same window, not new tab.
        var my_loader:Loader = new Loader();
        my_loader.load(new URLRequest("http://ipmsit.tsmc.com.tw/Hotspot/Hotspot/index.html"));
        newVBox.addChild(my_loader.content as DisplayObject); - throws exception
         vs.addChild(newVBox); -- "vs" is the id of the ViewStack
    Warm Regards
    Anand Uthaman

    Anand,
    use iFrame in HTML Wrapper
    https://github.com/flex-users/flex-iframe
    Thanks
    Pradeep

  • How to open google search in new tab?

    In Leopard you could hit Command and Return, and the search would open in a new tab, this however doesn't work with Snow Leopard. What shortcut can I use to open my google search with a new tab, rather than over the existing page.
    Thank you.

    I have that option checked and use that function all the time. I'm wanting my search from the search bar to open in a new tab, not the existing page. Command - click only works if you click on a link within a page.
    Thanks for replying.

  • Open PDF's in new window in document library when using "Find a file" search

    I need to be able to open PDF's in a new window from a document library when using the "Find a file" search built into the document library "All documents" view. I currently have the following javascript on the page:
    _spBodyOnLoadFunctionNames.push("setTargetBlank()");
    function setTargetBlank()
    { $("a[href$='.pdf']").removeAttr('onclick').attr("target", "_blank");
    This works great when going to the document library and navigating through the folders then clicking on a link.
    The problem is when someone goes to the document library then uses the "Find a file" search and then they click on a link. The "Find a file" search does not do a postback (reload) of the page, therefore my javascript to find the PDF links
    and make them open in a new window does not run for the links on the page.
    I have read the following article but this does not seem to offer a solution that will work in this situation for SharePoint 2013 (Office 365): http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ad3224c-3165-47ae-95bc-4f3928e2f9a8/opening-document-library-pdf-in-a-new-window-sharepoint-2013?forum=sharepointgeneral
    I suppose the idea solution would be to somehow tap into the event that is fired when using "Find a file" search to run my javascript and update the links for the search results.
    Can anyone offer any solutions to this issue?

    Hi,
    According to your description, my understanding is that you want to open PDF files in a new window from a document library when using the "Find a file" search.
    As you said, the "Find a file" search does not do a postback (reload) of the page, therefore JavaScript to find the PDF links and make them open in a new window does not run for the links on the page.
    I recommend to use JS link to achieve the goal. Create a JavaScript override file and upload the JavaScript file to the Master Page Gallery, and then set the JS Link property of the document library web part to point to the JavaScript file.
    Here are some links about the JS link in SharePoint 2013 for you to take a look:
    http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
    http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
    http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Hyperlink + ctrl click opens the page in new tab in my website. it should open it in the same window of my website

    When i do a ctrl+hyperlink click in my website running in firefox, it opens up in a new tab, I dont want the ctrl+hyperlink click to open in new tab or new window. It should open in the same browser. (works as required in IE 7)
    == This happened ==
    Every time Firefox opened

    Ctrl+left click on a link or bookmark will open in a new tab. That is a standard Firefox keyboard shortcut. Middle-click will do the same (Middle-click = press the scroll wheel). On the following page, scroll down to "Web Navigation" or Find (Ctrl+F), enter "Ctrl+lef" (without quotation marks) in the Find box. Read the footnote 4 about how to change from background tab to foreground tab.
    See: http://www.7is7.com/software/firefox/shortcuts.html
    To open a link or bookmark in the currently active tab, simply click on the link or bookmark. Your current tab will be over-written with the new link or bookmark.
    The following page shows the shortcuts for IE7. Click "Working with tabs". It shows Ctrl+click will "Open links in a new tab in the background" and on the next line, it shows CTRL+SHIFT+click will "Open links in a new tab in the foreground".
    See: http://windows.microsoft.com/en-US/windows-vista/Internet-Explorer-keyboard-shortcuts#
    Maybe you have installed something to change the shortcuts on your installation?
    <u>'''''Other Issues''''': to correct security/stability issues</u>
    <u>'''Update Java'''</u>: your version 1.6.0.18; current version 1.6.0.20 (<u>important security update 04-15-2010</u>)
    ''(Windows users: Do the manual update; very easy.)''
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed

  • I'd like to have web links open automatically in a new tab. How do I make this happen?

    1. When I open Firefox I have it set up that my gmail page automatically opens. When I want to go to another web site a new tab does not open but replaces my gmail tab. Then I have to use "back" or "history" to return to the gmail page. This gets difficult when I have been surfing the web & then have to go "back" thru numerous web pages. I'd like each web page to open in it's own tab. How do I do this?
    2. Also, in google help it stated: " If you want to open a link in a new tab instead, just right-click on the link and select Open Link in New Tab from the context menu. " I tried this & the "Open Link in New Tab" did not appear in the menu. Can you assist me in locating this menu?

    If you use Ctrl + left-click or middle-click a link then the link should open in a new tab.<br />
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work

    When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work. I did not have the problem until I started using firefox 4.

    It is probably a JavaScript link.
    You can probably force it where you want it with a keyboard shortcut
    either "Ctrl+click" or "Ctrl+Shift+click". see
    * Firefox and other Browser Keyboard Shortcuts (Comparison Table)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm
    ''Did that work?''
    Some styles that provide a warning as to the type of link:
    * No Follow links, mouseover id of other links - userstyles.org<br>http://userstyles.org/styles/10987
    * Change cursor on some links with JS. - userstyles.org<br>http://userstyles.org/styles/233
    * Link Warning - Themes and Skins for Mozilla - userstyles.org<br>http://userstyles.org/styles/1301
    * Link warning (cursor hover) - various filetypes - userstyles.org<br>http://userstyles.org/styles/2538
    * Red hand cursor for .pdf links - userstyles.org<br>http://userstyles.org/styles/553

  • Drag a picture with hyperlink to open it in a new tab

    When I drag a picture with a hyperlink to open it in a new tab, always it asks me to save the picture. I think it is good to do so when I want a screen shot, but I have got an another app that could do screen shots with ease. So, would someone help me out?
    I don't want to save it, simply open it in a new tab. Thanks all.

    Anyone help?

  • How do I set Firefox preferences to automatically open links in a new tab (just like Firefox3) ?

    For example, when clicking on a link from a Google search, how can I have the link open automatically in a new tab as opposed to replacing the current page ?

    Hey, cor-el -- long time no see! Hey, I have a problem, & my brain isn't working well enough to suss it out at the moment. :(
    For some reason in the last week or so, links selected from either bookmarks or address bar no longer open automatically on selection, plus google search has disappeared from the nav toolbar . (Don't ask "what add-ons have you updated?" I don't know, & the add-on manager says I haven't done any recently.)
    I checked about:config for browser.search.openintab; value is still set true. I toggled it false, restarted FF, then re-toggled true & another restart -- no joy. :(
    I'm running 7.0.1 (release channel) on my work machine & the latest 8.x beta candidate at home; both exhibit the same behavior, so I'm assuming it's not a beta bug. What am I missing? I know it has to be something simple, but my brain refuses to compute. I know I could use safe mode & successively re-enable my add-ons, but I don't really have the time or mental clicks available.
    I'm hoping it's something simple since I really don't have time to plod through everybloodydangthing for the one bad value that I'm sure is causing it. :/
    Regards & Happy Monday!
    Bill

Maybe you are looking for