How to make the Title Field link open in new window

rss

Posted by davidnarramore - Feb 19 ’15 at 03:40

I have a requirement to have the "Title" field link from the Document Library open in a new window instead of the current tab. I have copied links from other libraries into enhanced rich textboxes and they open in a new tab. I have modified the XSLT to include the target="_blank" and it works from the library, I want to open the document without leaving the display or edit forms.

 

David

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 8 months 7 days
    #1 by Dmitry Kozlov Feb 20 ’15 at 06:33

    Hello David,

    As I understood, you want to open a link from the Name field in a new window, am I right? If so, please, insert the following code in Display and Edit forms:

    fd.field('FileLeafRef').control()._el().find('a')
    	.attr('target', '_blank')
    	.attr('onclick', '');
     
  • davidnarramore
    Member
    Member for: 8 years 4 months 7 days
    #2 by davidnarramore Feb 20 ’15 at 07:09

    Thank you Dimitri. Where do I put it? I'm not a developer.

     

    D.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 8 months 7 days
    #3 by Dmitry Kozlov Feb 20 ’15 at 07:35

    [#2]: Open the display form in Forms Designer, click JS button on the ribbon and insert the code from my previous message into the dialog. Next, save the form and repeat the steps for the edit form.

Displaying 1 to 3 of 3 messages