You are viewing limited content. For full access, please sign in.

Question

Question

weblink and new window/tab

asked on February 14, 2014

 Hi, I sent an email to PreSales on the 12th but have not gotten a reply.

 

HI, is it possible to have a new window/tab in order to view a pdf  document? User ends up X'ing on IE and hence, closes/logs out of WebLink.

Yes, user can hit the arrow back on IE or  right click on document and choose "open in new window' but user would like something automatic.

 

I can't find anything in the Weblink Admin Utility nor in your forum/kb. Not sure if any of the aspx can be customized.

0 0

Answer

APPROVED ANSWER
replied on February 17, 2014 Show version history

If you wanted to do something like that only for pdfs and don't mind a little deeper customization, you could do something like this by adding a reference to jQuery:

 

$(function(){
    $('a.DocumentBrowserNameLink').click(function(e){
        e.preventDefault();
        
        if($(this).children('nobr').children("img.DocumentBrowserNameImage").css("background-image").match("pdf")){
            window.open(e.currentTarget);
        };
    });
});

It's a little hacky, but it appears to work if that's the functionality you're after.

1 0

Replies

replied on February 17, 2014

Since WebLink is highly customizable, you could modify the aspx page to open every link as a new tab by adding the following line to the page’s header:

 

<base target=”_blank”>

 

Currently, it is not possible to configure this exclusively for PDFs. 

1 0
APPROVED ANSWER
replied on February 17, 2014 Show version history

If you wanted to do something like that only for pdfs and don't mind a little deeper customization, you could do something like this by adding a reference to jQuery:

 

$(function(){
    $('a.DocumentBrowserNameLink').click(function(e){
        e.preventDefault();
        
        if($(this).children('nobr').children("img.DocumentBrowserNameImage").css("background-image").match("pdf")){
            window.open(e.currentTarget);
        };
    });
});

It's a little hacky, but it appears to work if that's the functionality you're after.

1 0
replied on February 18, 2014

HI, thanks for both replies. Which aspx page to be altered? Docview.aspx?

1 0
replied on February 18, 2014

Browe.aspx I believe. It's the page that actually holds the folder browser control. Docview.aspx is what actually displays the document. Setting basetarget effects all hyperlinks on that page. The same with the JavaScript snippet.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.