For a SharePoint list LVWP - how to open links in new window? (Without SPD - Without access to server)

Hi there,
I canNOT use SharePoint Designer nor do I have access to server to change any 14 hive files.
I have a SharePoint 2010 List with a field of type Hyperlink. I need these links to open in New Window. Only links with-in this LVWP should open in new window (and not links on Quicklaunch or top nav).
Any clues how to achieve this please? JS is okay.
Thanks.

Hello,
The good news is that you're not the first to have those requirements!
Here's the JavaScript:
<script>
var allLinks = document.querySelectorAll("table.ms-listviewtable tr td a");
for(var i=0; i<allLinks.length; i++){
if(allLinks[i].onclick == null){
var targetUrl = allLinks[i].href;
targetUrl = targetUrl.indexOf("?") > -1 ? targetUrl + "&isDlg=1" : targetUrl + "?isDlg=1";
allLinks[i].href= "javascript:var options = {width:500, height:300, url:'"+targetUrl+"'}; SP.UI.ModalDialog.commonModalDialogOpen('"+targetUrl+"', options);";
</script>
This script can be saved to a text file and uploaded to a document library. You can then add a content editor web part below your list view web part (so that it doesn't execute until after the list view has loaded) and set the "content link"
property of the web part to be the path to the uploaded text file.
The solution was originally posted here:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8ca275df-1d9c-4d0f-a624-c0531fda069a/how-to-open-model-dialog-onclick-of-list-item-hyperlink-column?forum=sharepointdevelopmentprevious

Similar Messages

  • List - Navigation Outline - how to open link in new window/tab?

    I have created Navigation Outline but would like to open links in the new window or tab.
    We are using single sign-on within our intranet therefore the links looks like that: f?p=105:1:&SESSION..
    Does anybody have any ideas how to open new window, I have tried this: target="_blank" but it doesn't work.
    Thanks in advance.
    Robert

    Where exactly are you building this link to open a new window? Are you builidng it inside the query? a column link? I'm just curious; as it would make a slight difference in syntax, or where to escape, or whether or not you need to escape or not. But anyways, you could look into the javascript:popupURL syntax.
    So if you were building a link inside a query, the syntax would look similar to:
    '<a href = "javascript:popupURL(''f?p=&flow_id.:101:&session.::&debug.::&P101_ITEM:&P99_MATCH_ITEM.'')">Link</a>'
    Those are two single quotes that start and end the ....f?p-url-part....I.e., escaped.
    But thats just an example. Hope that helps.

  • How to open link in new window using Mountain Lion

    When I upgraded to Mountain Lion, opening a link closes the window I'm in when it opens the new one.  Example, I'm in email, click on a link, and then have to reopen email.  The back button doesn't work.  Where is the setting to change this so my current window remains open?  I use Safari.

    The option to open in a new tab or new window is in Safari > Preferences > Tabs > Open pages in tabs instead of windows: Never, Automatically, or always.

  • I want to eliminate or control popup windows that have no relevance and start with "open link in new window" . How do I control or eliminate. It is a nuisance.

    When I am searching the web and click on an item, I get a pop up window that contains 6 choices beginning with "open link in new window". Most of the time this a nuisance and I want to get rid of it, but it follows me all over the page and keeps popping up when I click on the same item again. If I don't want to use it, how can I make sure it doesn't reappear?
    Also, another question. Firefox keeps asking me to upgrade to Firefox 3.6.19, but when I try, it will download. What gives? I have a Mac Pro with OSX version 10.6.7.
    Thanks,
    Lloyd Frohreich
    [email protected]

    It sounds that you are opening the right-click context menu, maybe by pressing the mouse button for too long.
    See:
    * http://kb.mozillazine.org/ui.click_hold_context_menus

  • The right-mouse-click dropdown on links in FF4.00 has swapped the positions of 'open link in new tab' & 'open link in new window'. This is infuriating as I keep opening windows when I want tabs. I want to swap back - how?

    Please swap them back!

    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.

  • Open Link in New Window Option Not Working in Top Link Bar

    Hello,
    We have a 'Popular Links' section in our Top Link Bar for our intranet site that contains a list of frequently used links. Since most of these links navigate to sites outside of SharePoint, we would like these to open in a new tab or window when clicked. 
    I've enabled the 'Open Link in New Window' option under Site Navigation Settings for each link, however when a user clicks the links that have had this option enabled the content is still loaded in the current tab.
    Is this the correct set of steps to enable this content, or is there a better way to accomplish this that actually works?
    **SharePoint Server Publishing Infrastructure has been activated.

    You can try deactivating Minimal Download Strategy feature present under "Manage Site Features"....

  • Put back "Open Link in New Window" first and default, rather than "Open Link in New Tab" in Safari 6.1

    I do not like the order of the context menu changes in Safari 6.1.  I have become accustomed to using "Open Link In New Window" first in the context list, rather than the new "Open Link In New Tab".  I do not wish to use Tabs.  How may I remove this?

    Well, I solved it just after I posted this.  I opened up the Safari Preferences, then went to the TABS section, and set "Open pages in tabs instead of windows: to NEVER", and unchecked "⌘-click opens a link in a new tab".   That set it back to open in new windows.
    Tabs work if I am making quick tabs to refer to something.  Horrible if I want to compare two websites side by side.  So, by disabling the auto TAB function, I'm back to the way I prefer my browser to work, rather than the way something thinks I ought to use it.
    Don't care about having all my browsers behavior the same.  If I wanted that, I would have run those browsers.

  • Open Link in New Window not working

    Using iWeb 08, I create a new entry on my blog/news page, highlight the text, go to the link tab, paste in a website, make sure 'Link to an External Page' is selected, and put a tick in 'Open Link in New Window'.
    When published it opens in the same window. Is this a bug or how can I correct it?

    Try redoing your link and, this time, deselect the link on the page and look at the inspector window to see if anything has changed. Then check the 'make hyperlinks active box". Your linked page should open in the browser when you click the link on the iWeb page.
    If this is OK do a "publish all to .Mac" and empty your browser cache before visiting your site.

  • Open Link in New Window creates an invisible window (visible after restarting).

    When I use the right mouse button menu to Open Link in New Window from a web page it creates an invisible window. That is, I cannot see the window but it is listed in the Firefox Window menu. This newly opened window cannot be selected either by mouse or from the Window menu. However, if I quit and restart Firefox the new window appears as 0 pixels wide (i.e., a 1 pixel wide vertical line) and I can select it (by mouse or Window menu) and zoom it from the Window menu. After zooming I can operate on the window normally.

    Get Firebug and inspect the element. You'll see that it actually is this:
    onclick="javascript:saw.runThis
    URL('saw.dll?PortalProperties&_scid=To2OnvCVXpY&PortalPath=/shared/paint/_portal/PoC\x2520FINS&Done=ManagePortals\x2526Done\x253dAdmin');return false" href="javascript:void(null)" FF doesn't even give you the "Open..." options and all IE versions as of 7 show them but actually don't do anything when you invoke them.
    Edited by: Christian Berg on Sep 9, 2009 10:36 AM

  • Open link in new window inSafari  5.0.1

    Without doing anything I know of I no longer have "OPEN LINK IN NEW TAB" when I right click over a link. Also when I right click "OPEN LINK IN NEW WINDOW" I get a blank TAB that says "UNTITLED".
    Thanks for any help

    HI,
    From your Safari Menu Bar click Safari/Empty Cache.
    Relaunch Safari.
    If that didn't make a difference, troubleshoot the Safari .plist file.
    Open a Finder window. Select your Home Folder in the Sidebar on the left. It has a small house icon. Then open the Library folder then the Preferences folder.
    Move the com.apple.Safari.plist file from the Preferences folder to the Desktop. Now launch Safari. If Tabs work as they should, them move the .plist file to the Trash.
    Carolyn

  • When I click to open anything I get a box saying open link in new window, open link in new tab, download linked file etc.  When I go to close anything I get hide toolbar, customize toolbar.  It takes  3-5 clicks and it will finally close.

    When I click to open anything I get a box saying open link in new window, open link in new tab, download linked file etc.  When I go to close anything I get hide toolbar, customize toolbar.  It takes  3-5 clicks and it will finally close.

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Firefox4 "Open Link in new Tab" and "Open Link in new Windows" switch back to the old FF3 version

    Am I the only one finding this annoying?
    I want to know how to switch "open link in new tab" and "open link in new Windows" like it was in Firefox 3.
    If you mousehover on a link and press the right mousebutton.

    Sara, I started having the same problem yesterday. In my case I was able to remedy it by disabling FasterFox 3.9.81. If you don't have that installed, I would recommend turning off your extensions (one by one), restarting firefox, and testing until you find the offender. Hope that helps!

  • Itouch safari only opens links in new windows

    It only started a little while ago but my itouch suddenly ONLY opens link in new windows which can get frustrating. Anyone know if this is normal now or if there is a problem I can fix?

    HI and Welcome to Apple Discussions...
    From the Safari Menu Bar click Safari/Preferences and select Tabs from the Menu. Perhaps your settings changed after the update.
    Also, if you didn't repair disk permissions after the Safari 5 update, it would be beneficial to do that.
    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.
    Carolyn

  • Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL..

    Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL. However, if I right click on a link and select "Open Link In New Tab", the Tab shows URL in address bar. So it's working when it's a New Tab but not a New Window.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • "Open Link in new window" not working with OBIEE 10.1.3.4

    Hi All,
    Recently we upgraded from Siebel Analytics to OBIEE 10.1.3.4.
    In OBIEE Go to Settings > Administration > Managae Interactive Dashboard > Select any Dashboard > Right Click on Properties tab > Open Link in New window:
    This throws an error saying "javascript:void(null)".
    In Siebel Analytisc the above functionality used to work.
    Does anyone knows thereason behind this?
    Regards,
    Apoorv

    Get Firebug and inspect the element. You'll see that it actually is this:
    onclick="javascript:saw.runThis
    URL('saw.dll?PortalProperties&_scid=To2OnvCVXpY&PortalPath=/shared/paint/_portal/PoC\x2520FINS&Done=ManagePortals\x2526Done\x253dAdmin');return false" href="javascript:void(null)" FF doesn't even give you the "Open..." options and all IE versions as of 7 show them but actually don't do anything when you invoke them.
    Edited by: Christian Berg on Sep 9, 2009 10:36 AM

Maybe you are looking for

  • Grid Download to Excel truncates leading zeros

    We are on tools 8.51. The download feature for a Grid now removes the leading zeros when the grid is downloaded to excel. Has anyone found a way to fix this issue ? Thanks in advance

  • Blue box instead of image?

    Why is it that I sometimes get a blue box with a question mark rather than the image? I've tried closing the browser and reloading, to no avail. Any suggestions? Thx!

  • Table loading with empty selected row

    hi i have below table ,when the page load it has empty row created, i what it to show that message emptyText=No data to Display when the page load,the table was created based on the bean,am in jdeveloper 11.1.1.6.0,i don't what to use #{!adfFacesCont

  • Initial download problem with DNL_CUST_CNDALL

    When I am trying to download the DNL_CUST_CNDALL, it status is in waiting for a long time. I checked in SMQ2 inbound queue of CRM the status is in Ready for the R3AI_DNL_CUST_CNDALL. I am unable to find the error? It is very urgent, the connection is

  • XFree86 problems

    I'm having several problems getting XFree86 working.  I run X -configure then try XFree86 -xf86config /root/XF86Config.new and I get some nasty errors: xf86OpenSerial: Cannot open device /dev/mouse   No such file or directory etc I can edit XF86Confi