XSLT Issue to open URL in new tab and PopUp Window through one custom style

I have SharePoint Online Custom List that contains two columns
Name: Single Line of Text
URL: Hyperlink or pictures
Using XSLT I have shown Name columns value on my home page by using below custom style in
Itemstyle.xsl file.
Custom style to show Link in PopUp window   itemstyle.xsl
<xsl:template name="OpenApplicationPagePopUp" match="Row[@Style='OpenApplicationPagePopUp']" mode="itemstyle">
<xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title"/>
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<div class="item link-item">
<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
<a href="{$SafeLinkUrl}" onclick="ShowPopupDialog(GetGotoLinkUrl(this));return false;">
<xsl:if test="$ItemsHaveStreams = 'True'">
<xsl:attribute name="onclick">
<xsl:value-of select="@OnClickForWebRendering"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">
<xsl:attribute name="onclick">
<xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute"/>
</xsl:attribute>
</xsl:if>     
<xsl:value-of select="$DisplayTitle"/>
</a>
</div>
</xsl:template>
My Requirement to show only Suggestion Box in Popup window Other Links Should be open in new Tab So please suggest me what can change in above xslt...
Thanks
Deepak Chauhan
SharePoint 2010 & 2013 and Office-365 Branding and Front End Customization, UI Design

Hi,
In SharePoint 2013, we can use JSLink to achieve it.
1. Save the following code as a js file (URLPopup.js) and upload it into the
SiteAssets Document Library.
// List View – Field open modal dialog Sample
(function () {
// Create object that have the context information about the field that we want to change it output render
var linkFiledContext = {};
linkFiledContext.Templates = {};
linkFiledContext.Templates.Fields = {
//Apply the new rendering for URL field on List View
// "URL" is the column name.
"URL": { "View": URLFiledTemplate }
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(linkFiledContext);
// This function provides the rendering logic for list view
function URLFiledTemplate(ctx) {
var itemTitle=ctx.CurrentItem.Title;
var urlLink=ctx.CurrentItem.URL;
var urlDesc=ctx.CurrentItem['URL.desc'];
if(urlLink!=null&&urlLink!=""){
if(itemTitle=="Suggestion Box"){
return "<a href='#' onclick=\"openModalDialog('"+urlLink+"')\">"+urlDesc+"</a>";
}else{
return "<a href='"+urlLink+"' target='_blank'>"+urlDesc+"</a>";
}else{
return "";
function openModalDialog(url)
var options = {
title: "Suggestion Box",
autoSize: true,
url: url
SP.UI.ModalDialog.showModalDialog(options);
return false;
2.Edit the list view page.
3.Edit the list web part. Go to Miscellaneous -> JS Link.
4.Add the following URL into the JS Link textbox.
 ~site/SiteAssets/URLPopup.js
5.Click "OK" and save the page.
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • Uninstall SAP GUI 640, cause IE can not open URL in new tab.

    We would like to update all SAP GUI from 640 to 710,
    all users' GUI is 640 with patch 24.
    We use SAP GUI installation server to deploy new version GUI.
    in the test period, We find uninstall 640 GUI, will cause IE problem.
    IE can't open URL in new tab(IE7) or window(IE6) after uninstall 640.
    Any guys met some issue?
    BTW, where I can find detail GUI uninstall log.
    any suggestion, Pls reply me.

    thanks Sergo,
    after met the issues, I use regsvr32 mshtml.dll to fix this problem.
    your information is very helpful for me.
    thanks very much.

  • Middle mouse button no longers open URL in new tab.

    So, I'm on Firefox 6.0.2 and my middle mouse button no longer opens urls in new tabs.
    It closes them, reopens old ones fine, just no longer opens links in new tabs.
    Any ideas?

    The problem may be about a Greasemonley update :
    http://superuser.com/questions/332782/middle-click-tab-opening-stopped-working-in-firefox/332794#332794

  • I want to open URL in new tab in SSRS report.

    I want to open URL in new tab. Actually I am passing URL expression in Action options of Textbox properties in SSRS report.The user is getting directed to desired URL but using same tab in which report is generated. I want to open URL in new tab.
    How it is possible?

    See if this thread going to help you
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6ca4b1d4-3a04-413b-bd31-856aac3d8a8c/how-to-open-url-in-new-tab-rather-than-new-window-in-ssrs-2008-r2?forum=sqlreportingservices
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I get a favorite or bookmark to open in a new tab automatically, not in the one I am working in? The tab options/settings are unhelpful.

    I have 2 laptops. Both have Firefox as my number one preference.
    One computer, is set up correctly, If I am on a site, tap on a bookmark site, it will open in a new tab and not interfere with my current tab. It's wonderful.
    The other Firefox, if I click a bookmark it will open in the CURRENT tab, changing the tab to the selected bookmark.
    I have uninstalled and reinstalled FF, but that did not correct the issue. I have read the tab options and help desk, but that doesnt help either.
    ANY HELP? :)
    -Kristen

    There is no built-in setting for redirecting a bookmark to a new tab.
    Is it possible that the computer which does that has an add-on such as the Tab Mix Plus extension installed? TMP has a setting for that (Events > Tab Opening).
    https://addons.mozilla.org/firefox/addon/tab-mix-plus/

  • Open in an new tab and open in a new window - both dissapeard

    open in an new tab and open in a new window - both dissapeard
    where have they dissapeard to?
    how can i bring them back?
    thanks !!!!!!!!!

    Please press alt and tab and using tab to scroll through windows and see if the window you opened exist. If this happens every time you open a new window you may want to try safe mode:
    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • 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!

  • Open All in Tabs, opens bookmarks in new tabs and leaves current tab open instead of changing to the first bookmark

    Whenever I click the "Open All in Tabs", it opens all the bookmarks in new tabs instead of opening the first bookmark in the current tab and the rest in new tabs.
    happens on all 3 of my computers running 8.0a1

    This isn't possible anymore, due to the fact that this Boolean entry has been removed: https://bugzilla.mozilla.org/show_bug.cgi?id=395024
    <br />
    In my Firefox Aurora 8.0a2 (Windows 7, but Ubuntu 10.10 as well) the current behaviour could be described as follows: <br />
    Open all in tabs
    <ul><li>Normal click: opens all in new tabs, changes focus to first one opened;</li>
    <li>Ctrl + click: opens all in new tabs, changes focus to first one opened;</li>
    <li>Shift + click: opens all in new window, changes focus to first one (tab) opened;</li>
    <li>Ctrl + Shift + click: opens all in new tabs, doesn't change focus.</li></ul>
    <br />
    Whereas I would like it to be as follows: <br />
    Open all in tabs
    <ul><li>Normal click: opens all but the first one (which overwrites current) in new tabs, doesn't change focus (due to the fact that the first item is already in the focused tab); in short, it changes the currently focused to the first item from the folder and appends its' rest on the right side;</li>
    <li>Ctrl + click: opens all in new tabs, doesn't change focus;</li>
    <li>Shift + click: opens all in new window, changes focus to the first one (tab) opened;</li>
    <li>Ctrl + Shift: opens all in new tabs, doesn't change focus.</li></ul>
    <br />
    This behaviour was present a few versions ago and only lately have I looked for the solution to this. I encountered many bug files regarding this topic with people speaking against Firefox's behaviour that would close existing tabs when opening all in new tabs (from a folder), which possibly influenced the change that I would like to be reverted.
    <br />
    Please let me know if it is possible to attain the behaviour I described.

  • Why did in the right-click menu the "open in a new tab" and the "open in a new window" -buttons change places? And can you change it back?

    With the Firefox 4 RC, the "open in a new tab" and the "open in a new window" -buttons have changed places. It's quite annoying because I normally do it without even looking at it, but now it always opens in a new window instead of a new tab. Is it possible to change it back? Maybe in your own settings?

    You can use the menu editor extension to rearrange menu items - https://addons.mozilla.org/firefox/addon/menu-editor

  • Why doesn't ctrl click to open URL in new tab always work?

    Same action as control enter (windows desktop); should open link in new tab. Works most, but not all of the time. What might be the reason for that?
    Using version 31; I only started seeing this behavior recently.

    It might be that the link in question looks like a link,
    but was not flagged as a link.
    Next time, try this; In Firefox, Highlight the bad link, right click,
    and select '''open new tab / window.'''
    If this does not help, post the web address of that page, and
    tell use what does not work. Give directions.

  • Every time I click a link, it opens in a new tab instead of the existing one.

    Whenever I left click on any link, Firefox opens the link in a new tab. Previously it would only open a link in a new tab if I either middle clicked, or right clicked and specifically selected 'Open Link in New Tab.'

    This may be because the site is instructing the browser to open them in a new tab (I know, it's a big usability issue, but the web is still young...). Can you try it on other browsers and see what happens? If the same happens, yes, it's probably the site that's telling the browser to open the link in another tab.
    If you want to eliminate that behavior, and be in full control of where the links open (middle click to open in new tab, left click to open in the same tab - as it ''should'' be), I suggest you install an extension like [https://addons.mozilla.org/en-us/firefox/addon/1122/ Tab Mix Plus], which, among other things (many things, it's an absolutely phenomenal extension) will let you configure "links that open in a new window" to open on the current tab.

  • How can I get any of the search requests to open in a new tab and not the current window. I have just downloaded the new FF8

    In my previous version of FF, whenever I did a search with any search engine the results opened in a new tab. Now with FF8 the results open in the current window which really is inconvenient. How do I get the search results to open in a new tab instead?
    I have Windows xp FF8

    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)
    Use the Filter at the top of the page to locate this pref: <b>browser.search.openintab</b>
    If the value of the browser.search.openintab pref is false then toggle the value to true with a double click on that line.
    See also http://kb.mozillazine.org/about:config

  • I am running 3.6.12 and my new tab and/or window actions are the same. How can i open new links within apps into new tabs?

    I used to be able to control new tab actions such as opening on top of current tab or in a new tab. This is frustrating as i always cover up where I am or was! How can this be corrected so I can open a new tab in a new tab? I am enrolled in an on-line class and can not open tabs in a new tab as needed as it always places the new tab on top of teh current or old tab.
    Funny as i use to complain about opening in new windows!
    I am missing how to control new tabs and new window actions?
    THanks,
    William

    Do you have any tab related extensions (Tools > Add-ons > Extensions) that allow to divert links?<br />
    See [[Troubleshooting extensions and themes]]
    Did you ever made changes to the prefs browser.link.open_newwindow and browser.link.open_newwindow.restriction yourself on the about:config page?
    See:
    * http://kb.mozillazine.org/browser.link.open_newwindow
    * http://kb.mozillazine.org/browser.link.open_newwindow.restriction
    See also http://kb.mozillazine.org/about%3Aconfig

  • Why does "open in new tab" function, open in both new tab, and the current window ?

    Right click on something, select "open in a new tab" As well as opening in a new tab, quite frequently the current window is overlayed with the same thing.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    There are other things that need your attention.
    Your System Details List shows multiple Flash plugins.
    # Shockwave Flash 14.0 r0
    # Shockwave Flash 11.7 r700
    You can find the installation path of all plugins on the <b>about:plugins</b> page.
    *http://kb.mozillazine.org/Issues_related_to_plugins#Identifying_installed_plugins
    You can check the Flash player installation folder for multiple Flash player plugins and remove older version(s) of the plugin (NPSWF32) and possibly (re)install the latest Flash player.
    *(32 bit Windows) C:\Windows\System32\Macromed\Flash\
    *(64 bit Windows) C:\Windows\SysWOW64\Macromed\Flash\

  • Is it possible to have the Navigation Toolbar (or at least the pop-up Location Bar) show automatically when I open a (blank) new tab and be automatically hidden once I select an address/search?

    I'm obviously aware of the possibility to show/hide the Navitation Toolbar manually, but I'd like to have it done automatically to get the best of screen space and navigation ease.

    Thanks cor-el! I had tried that out, but was turned off by the different workflow (can't click Tab to select the address suggestions) and assumed by the look that I couldn't use my Smart Keywords for searches.
    In fact, the workflow isn't that much bulkier and the Location Bar is fully functional:
    * ''for a search: Ctrl+L, (Smart Keyword +) [search terms], Enter''
    * ''for a suggested address: Ctrl+L, Down, Enter, Enter''
    Still, it would be nice in future versions if:
    # the Location Bar could automatically open when opening a (blank) new tab (just as the cursor automatically goes to the Location Bar when a new tab is opened with the Navigation Toolbar showing) to avoid the Ctrl+L step of the workflow
    # the Tab, Enter workflow could be enabled for selecting address suggestions in the pop-up Location Bar
    Or (most simply in my mind):
    if '''the Navigation Toolbar could be set to show when a (blank) new tab is opened and disappear once an address/search is selected'''.

Maybe you are looking for

  • Few keys in Keyboard is not working.

    Few days back my laptop( HP Pavilion G6) screen got froze(Laptop starting but no display, caps key blinking 3 times) so i checked on internet and come to know its may be because of error in memory module. So i put my RAM in other slot. Now my laptop

  • How to save a PDF In Adobe X

    I read the other threads, but their solutiuons do not work for me. I ahve Adobe X, but when I open a file, it does not have Advanced on top, or an extended tab on the right hand side.  Where can I go to enable saving the form?

  • I have unwanted Plugins I want to remove and I can't find a way to do it

    I have plugins other users have installed and I have disabled them but i want to remove them from my browser and i can find way to remove them

  • My E-Mail  is going off the screen, Help!

    I have a MacMini with Mail Version 2.1 (752/752.2) Very recently my e-mail both mine outgoing and my incoming mail have gone off the screen and I cannot read. Suggestions? Questions for me? Please help.

  • FTP Security - Repeated Login Attempts

    Over the past 2 weeks or so, i've seen about a bazillion of these types of entries in the system log of one of our ftp servers: Aug 21 03:39:22 ns ftpd[4099]: ACL Check failed for Administrator Aug 21 03:39:22 ns ftpd[4099]: ACL Check failed for Admi