Codes to open Video or Documents from Library to open in new tab by default

Hi 
I am using Sharepoint 2013 Office 365 web version to build and edit the TeamSite. 
Is there a way using SharePoint Designer or Scripts to Open the Video or Documents from the Document/Asset Library to open them in new tab or window when clicked? 
Currently, When clicking on video it opens in the same IE window, I could change the Thumbnails view to All asset view then right click and open it in a new windows. But I want this to happen by default when clicking the link
I would appreciate your view in detail. 
Regards, 
Daniel 

Hi,
If you just want to open the video or document in a new tab, yes, it can be achieved with JavaScript or JSLink.
However, it is not a recommended behavior to add script for such a functionality into a page cause it is more like an option of browser behavior and it would
make the pages in a site difficult in maintenance.
The easiest way I think, you can perform a “Middle click” or “Ctrl + Left click” to open the video or document in a new tab.
To achieve it using JavaScript, we will have to modify all the “onclick” properties of the items in a library after the page loaded which should be an extra burden of your
browser.
Here is a link with script demo about how to open a link in new tab for your reference:
http://junestime.wordpress.com/2013/02/26/javascript-open-links-in-new-windowtab-in-sharepoint-2010/
Feel free to reply if there are any questions.
Best regards
Patrick Liang
TechNet Community Support

Similar Messages

  • Making Open in New Tab the default?

    We're using Safari 3.0.4, and while I'm happy with the Command-click or right-click-and-select options to make a link open in a new tab, my son wants to know if there's a way to make "open in new tab" the default action when simply clicking on ANY link.
    It seems that option exists right now for links within other apps, but not for links within Safari itself. Has anyone figured out a way to do this?
    Thanks,
    John Bertram
    Toronto

    Problem is solved.

  • How do I get new pages in new tabs to automatically go the same setting as my home page? Google is my home page, and I want the opening in new tabs to default to Google also.

    Whenever I open a new tab, I want the new page to open to the same setting as my Home Page (in my case, Google). Instead it takes me to Bing. Even my Home Page reverts to Bing after I've set it to Google.

    The default New Tab in Firefox is a blank page and there is no built-in option to change that.
    *CTRL+left-click the Home icon will open a new tab to your set home page.
    **See --> http://support.mozilla.com/en-US/kb/How+to+set+the+home+page
    *This Add-on will open a new tab when clicking the new tab "+" icon (or when clicking New Tab from the menu) to whatever page you set in the options for the add-on:
    **'''''New TabURL''''': https://addons.mozilla.org/en-US/firefox/addon/newtaburl/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Garbled screen when opening a new tab

    Anyone have an issue like this...
    Basically, often but not always, when I hit the little + icon to open a new tab (by default to the Top Sites view), nothing happens for a few seconds, then I get the spinning disc for a few seconds, then a garbled screen for a few seconds before it appears correctly.
    The garbled screen seems to be made up of enlarged dock icons, or sometimes parts of recently closed QT video.
    Not sure if its a Safari glitch, or a graphics glitch that may warrant further investigation. I have horrible memories of all the nVidia nonsense, and already having logic boards replaced.
    Have done all the usual maintenance stuff - clearing Safari cache, repairing discs.
    Any advise very welcome - its not just safari, but generally, the machine (MBP) is starting to be a bit sluggish as if its a PC - just a few little things that on their own are practically nothing, but are starting to become a bit frustrating.

    HI,
    Download and install the 10.6.2 Combo Update which includes a fix. *a graphics distortion in Safari Top Sites*
    Then repair disk permissions...
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and *restart your Mac.*
    is starting to be a bit sluggish
    Check to see how much free disk space there is. Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. *Make sure you always have a minimum of 10% to 15% free disk space at all times.*
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem.
    Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    Since you are running Snow Leopard, *make sure Safari is opening in 32-bit mode, not 64.* Right or control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode. Also, (in that same window) make sure *Safari is NOT running in Rosetta.*
    

Web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. These icons take up disk space and slow Safari down. It is possible to erase the icons from your computer and start fresh. *To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/ and move this file "webpageIcons.db to the Trash.*
    Carolyn

  • When you open a new tab, how do you change the site it goes to?

    My Daughter downloaded accidently a tool bar, Searchqu.com. I have removed the tool bar and application, and reset the homepage. However when I open a new tab it defaults to http://www.searchqu.com/, how do I change this? I have tried resetting it to default and it does not help.

    Did you try opening '''about:config''' and filtering on the url (or part of it) to see if there is a configuration variable involved.
    How did you remove the toolbar and application, did you have to go into the control panel or did an extension sim,ply uninstall..

  • To open a pdf document or word document from a JSP into a new window

    Hi,
    How to open a PDF document or word document from a JSP into a new window. i.e say from a jsp when a hyperlink or button is clicked it should open a new window with the pdf document or word document in it.
    thanks in advance,
    radki_j

    Hi ,
    when i tried to use the below code to open my word document , it will open as html and with some garbage details. Doesnt open as word document. How to solve this kind of probem?Need advice urgently.
    Open Document

  • Open in new tab on right click fails to open in the current window when used in a dependent window called with window.open command from original window this worked fine until ver 4.0

    i have been using this page in all versions of firefox until ver 4.0 and it has worked fine
    https://npwas.com/dummy/charts/charts.html
    when this page is loaded enter a stock symbol in the text field "AAPL"
    then click one of the lower links --"Yahoo Headlines"-- and another window is opened with this code
    - function yahoolink(sqlstring, winnum) {
    - var myurl = "http://finance.yahoo.com/";
    - var mysymbol = document.SymbolForm.symbol.value;
    - var mysrc = myurl + sqlstring + mysymbol;
    - var mywindow = "mywindow" + winnum;
    - //alert("mywindow- " + mywindow);
    - if (sqlstring == "mb/")
    - mysrc = "http://messages.finance.yahoo.com/" + -sqlstring + mysymbol;
    window.open(mysrc,mywindow,'resizable=yes,titlebar1=1,toolbar=1,scrollbars=1');
    all this works but when i right click on a message or news item and select "OPEN IN NEW TAB" - it fails to open the tab in this current window it opens it in the parent window --
    the way i have always used this is to able to select news and right click all news items to read as new tabs and have all news items or messages to be grouped in the child window
    this is now broken or do i need to recode something??
    https:\\npwas.com come is my secure server and you may load the page and see the code
    so far i really love ver 4.0 especially the sppppppeeeeeeeeed!!!!
    keep up the great work
    thanx in advance
    tojo

    2 Solutions found in [http://support.mozilla.com/en-US/questions/791244]
    the user cor-el has a method that does not require any add-ons. He States
    This code in userChrome.css will move "Open Link in New Window" to the top of the context menu.
    <pre>@namespace url("<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"); /* only needed once */
    #contentAreaContextMenu &gt; * { -moz-box-ordinal-group: 2; }
    #context-openlink { -moz-box-ordinal-group: 1 !important; }</pre>
    the user jay_ff shows how to do it using the Menu Editor Add-on
    1. Install the Menu Editor add-on from https://addons.mozilla.org/en-US/firefox/addon/menu-editor/ .
    2. After the installation, go to Firefox> add-ons (or simply use Ctrl+Shift+A)
    3. Go to the Menu Editor "Options"
    4. In the "Main context menu," simply grab the "Open link in New Tab" and place it below the "Open Link in New Window"
    5. and Voila! You may also change other menu options if you want to!
    I tried jay_ff method first and found that indeed changing the Main Context Menu did cause the hotlink context menu to change as well.

  • I have an iMac, 2015 model. operating on OS X 10.10.2 and whenever I click on just about everything in safari it opens a new tab with an ad on it. sometimes the ads are mackeeper or video hosting sites but they are just so annoying.

    I have an iMac, 2015 model. operating on OS X 10.10.2 and whenever I click on just about everything in safari it opens a new tab with an ad on it. sometimes the ads are mackeeper or video hosting sites but they are just so annoying.

    There is no need to download anything to solve this problem. You may have installed a variant of the "VSearch" ad-injection malware. Follow Apple Support's instructions to remove it.
    If you have trouble following those instructions, see below.
    Malware is always changing to get around the defenses against it. This procedure works as of now, as far as I know. It may not work in the future. Anyone finding this comment a few days or more after it was posted should look for a more recent discussion, or start a new one.
    The VSearch malware tries to hide itself by varying the names of the files it installs. To remove it, you must first identify the naming pattern.
    Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination  command-C:
    /Library/LaunchDaemons
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder named "LaunchDaemons" may open. Look inside it for two files with names of the form
              com.something.daemon.plist
    and
               com.something.helper.plist
    Here something is a variable string of characters, which can be different in each case. So far it has always been a string of letters without punctuation, such as "cloud," "dot," "highway," "submarine," or "trusteddownloads." Sometimes it's a meaningless string such as "e8dec5ae7fc75c28" rather than a word. Sometimes the string is "apple," and then you must be especially careful not to delete the wrong files, because many built-in OS X files have similar names.
    If you find these files, leave the LaunchDaemons folder open, and open the following folder in the same way:
    /Library/LaunchAgents
    In this folder, there may be a file named
              com.something.agent.plist
    where the string something is the same as before.
    If you feel confident that you've identified the above files, back up all data, then drag just those three files—nothing else—to the Trash. You may be prompted for your administrator login password. Close the Finder windows and restart the computer.
    Don't delete the "LaunchAgents" or "LaunchDaemons" folder or anything else inside either one.
    The malware is now permanently inactivated, as long as you never reinstall it. You can stop here if you like, or you can remove two remaining components for the sake of completeness.
    Open this folder:
    /Library/Application Support
    If it has a subfolder named just
               something
    where something is the same string you saw before, drag that subfolder to the Trash and close the window.
    Don't delete the "Application Support" folder or anything else inside it.
    Finally, in this folder:
    /System/Library/Frameworks
    there may an item named exactly
                v.framework
    It's actually a folder, though it has a different icon than usual. This item always has the above name; it doesn't vary. Drag it to the Trash and close the window.
    Don't delete the "Frameworks" folder or anything else inside it.
    If you didn't find the files or you're not sure about the identification, post what you found.
    If in doubt, or if you have no backups, change nothing at all.
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • How do I open a new tab/new URL from a plugin's sidebar?

    I have created a plugin with a sidebar. I would like to be able to change the URL of the current tab in the sidebar's window or open a new tab, given that I click a button in the sidebar (or an event is triggered in the sidebar). I am currently using the following Javascript code to go to a new URL:
    content.location = newURL;
    However, I have other buttons in the sidebar that open new (small) windows. If I first click one of these buttons to open a new window, then the above code fails; it changes the URL of the tab in THAT NEW WINDOW, not in the window of the sidebar. How do I change this?
    This also seems to be complicated by the fact that the sidebar document does not have a parent. Any tips are appreciated!

    Hi fireferret817,
    Thank you for your question, however development questions are best answered in stackoverflow.com or the mozllazine.com forums.
    If there are any differences made when you change the behavior of opening up a new url this option can be found in the Preferences/Options > Tab menu.

  • QT Turn OFF Autoplay when video is open in new tab (CMD-CLICK url to open)

    Seems to me that what ever builds the HTML for the video by itself in the new tab window has turned on autoplay. I need to turn this. I have figured out how to get WMV files to stop playing automatically, but MOV files still do. I open 20 to 30 links a day for my job and having 10 things playing at the same time drives me crazy and then I have to rewind everything. On 10.5.8 I use Multi-safari 3.2.1 and do not have this problem. I can not use Safari 4 on 10.5.8 and have had to downgrade from 10.6.2 because of this.
    My theory is that maybe the HTML that is rendered is stored in WebKit and we should be able to get "Open in new tab" videos to be set with autoplay to FALSE.
    Let me know if you have any questions / solutions.
    PS ClickToFlash has nothing to do with this issue so do not mention it.
    I have demo videos sent to an Apple Engineer that details the issue.

    Here is more info to describe the issue.
    These are the movies sent to the Apple Engineers to show how our
    workflow has worked for 7 years until Safari 4 came out.
    Again this has caused us to go back to 10.5.8 though we enjoyed some of Snow Leopards improvements.
    Have your sound on when listening to safari4 so you can hear the overlaps.
    http://jenniradio.com/movies/safari3.m4v
    http://jenniradio.com/movies/safari4.m4v
    Would really like this fixed.
    Ian

  • Audio keeps playing when opening multiple new tabs from bookmarks folder

    Hi,
    Just wondering if anyone has noticed this behaviour in Safari and if its intentional or perhaps a bug.
    If I have a website open with some audio playing (like a youtube video etc...) and then open some new tabs from a bookmarks folder by choosing "Open in Tabs", the audio from the video in the previous tab will keep playing in the background. However, any tabs that were open before (including the one with the audio) seems to have been automatically closed when choosing the "Open in Tabs" option so there doesn't appear to be a way to stop the audio, other than closing Safari.

    You're welcome.
    Could you please click the "''Solved It''" button next to the post which solved the problem for you? This will help others searching for a solution to the same question.
    Thanks.

  • On a Mac, how do I setup Firefox to use Command+Enter to open a new tab from the address bar? Safari and Chrome do this by default.

    I tried this extension (https://addons.mozilla.org/en-US/firefox/addon/customizable-shortcuts/), but it doesn't appear to support editing the current "Alt+Enter" to change to "Meta+Enter" where Meta = Command on a Mac.
    I want to switch to Firefox, but this is the one and only thing preventing me from doing so! I have a decade plus of muscle memory using the key next to the space bar + enter to open a new tab. Please help!

    There is an older extension named keyconfig (last updated in 2011) which might be able to do it. I haven't used it for quite a while so I'm not sure how well it works any more.
    http://forums.mozillazine.org/viewtopic.php?f=48&t=72994 (link in first post)

  • Problems opening a New Tab in Safari from Bookmark Bar Folder

    When I am in Safari and attempt to Open a link to a new tab from the Bookmark Bar that is part of a Folder on the Bookmark bar it does nothing.
    I can change the preferences to auto-click for the Bookmark Folders, but then every link loads when I try to access the folder from the Bookmark Bar. Very cool to see lots of pages loading at once, but not what I'm after. Doesn't seem to be a way to just load 1 link from the folder
    If its a single link on the Bookmark Bar that has not been organized into a Folder it does work.

    You know what? - my Safari works just the same way.... but I'd never noticed before.
    I've used apple-click to open single bookmarks from the bar, many times. But have always ( for no particular reason) opened a new tab first ( apple-T ) if I've been looking for bookmarks within a folder.

  • In Options -- General -- I want the option to "Show my windows and tabs from last time" AND "Show my homepage", but that choice isn't given. When I open a new tab, I'd like to see my iGoogle page, not a blank screen. Hope you can help. D

    In Options --> General --> I want the option to "Show my windows and tabs from last time" '''''AND''''' "Show my homepage", but that choice isn't given. When I open a new tab, I'd like to see my iGoogle page, not a blank screen. Hope you can help. D

    You can middle-click or Ctrl left-click the Home button on the Navigation toolbar to open the Home page in a new tab.
    You can look at one of these extensions:
    * NewTabURL : https://addons.mozilla.org/firefox/addon/newtaburl/
    * New Tab Homepage : https://addons.mozilla.org/firefox/addon/new-tab-homepage/

  • In the latest version of Firefox, I am not able to open a new tab neither by Ctrl+T nor from the File Tab nor by pressing the '+' sign next to the last tab

    In the latest version of Firefox, I am not able to open a new tab neither by Ctrl+T nor from the File Tab nor by pressing the '+' sign next to the last tab. So the only solution is opening "New window" which is extremely messy. Kindly help me with this issue.

    hello, can you try to replicate this behaviour when you launch firefox in safe mode once? if not, maybe an addon is interfering here...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

Maybe you are looking for

  • No accounting document generated from SD

    Dear Friends, When I am creating Billing document from SD using VF01 tranacstion, I am getting error message that "Document 90000028 saved (no accounting document generated)", but I had activated all config between IS-U FI-CA and SD. I hope the billi

  • Flash 10.1 not working on Firefox 3.6.8

    I have Windows 7 64bit Ultimate; just clean installed today. I was in the process of putting all my programs and stuff back and wanted to put flash back. I started off with installing Flash for IE and that worked well and youtube videos are fine. I t

  • Implementing Copy and Paste on JTable cells.

    Hi to all, Can anybody suggest as how to impose copy and paste with Ctrl-C and Ctrl-V by using keys on JTable cells. Thanks in advance. khiz_eng

  • Buying an external drive for early 2008 imac?

    Hi,is there any reasonable way to add external storage to my "legacy" (pre thunderbolt / usb3) imac? would a firewire hd (assuming one can be found), besides paying a premium for obsolence involve tossing it out in a year or two, when replacing the i

  • Mac OS X Vs. Windows Vista

    Hello everyone. I just recently became a Mac user. So far I love it so much more then using a PC. I upgraded to a new Macbook from a Dell laptop. I just got so annoyed with all the problems and bugs I kept having with windows, and keeping up with the