Page 1 of 1

How to make the Title Field link open in new window

Posted: 19 Feb 2015
by davidnarramore
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

Re: How to make the Title Field link open in new window

Posted: 20 Feb 2015
by Dmitry Kozlov
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:

Code: Select all

fd.field('FileLeafRef').control()._el().find('a')
	.attr('target', '_blank')
	.attr('onclick', '');

Re: How to make the Title Field link open in new window

Posted: 20 Feb 2015
by davidnarramore
Thank you Dimitri. Where do I put it? I'm not a developer.


D.

Re: How to make the Title Field link open in new window

Posted: 20 Feb 2015
by Dmitry Kozlov
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.