How to make the Title Field link open in new window
-
- Posts: 76
- Joined: Wed Jan 21, 2015
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
David
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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:
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', '');
-
- Posts: 76
- Joined: Wed Jan 21, 2015
Thank you Dimitri. Where do I put it? I'm not a developer.
D.
D.
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests