In the web view, How to open doc. in a new window if user clicks on column value

Hi Guys,

I have the web view, in that the first column is the link to the document. Now I have requirement that that If user click on the column (first) the specific documents will open in new window and rest of documents open in the existing window.

Basically, from the view, if user click on the column value, it should open in the new window

Please let me know if any came across the same situation

Harshak

Subject: In the web view, How to open doc. in a new window if user clicks on column value

You have to create the link manually using pass-through HTML in your column formula like so:

{[<a href=“0/} + @Text(@DocumentUniqueID) + {” target=“NewWindow”>} + Topic +

{]}

(Please replace “<” with “<”, the forum does not allow to post this combination of characters.)

The value you provide for target is the programmatic name (not the title) of

the new window. Pick whatever name you like (and fits HTML conventions). There

are a number of reserved names with special meaning: E.g. a value of “_blank”

would result in each document being opened in a new window.

Subject: RE: In the web view, How to open doc. in a new window if user clicks on column value

Remember to uncheck the “Show values in this column as links” check box on the last tab of the column properties, otherwise you’ll get a link inside a link, resulting in undefined behavior.

/Peter

Subject: RE: In the web view, How to open doc. in a new window if user clicks on column value

I should have mentioned that for the sake of completeness.

But it’s usually even one more step: The first column will by default get a link, even if the column property to create one is not checked. So, to safely disable link generation, you have to first check the box, save the view and then uncheck the box and save the view again.

Having said that, it could even be, that this is no longer a problem with version 7, but it’s surely a good advice for 6.x.

Subject: RE: In the web view, How to open doc. in a new window if user clicks on column value

In the $$ViewTemplate form, you can use the HTML Head Attributes ( ) to set the default target for links on the page, which will affect all links on the page which don’t specify a target.

Otherwise, if you don’t want to have to specify the target for every non-view link, you can use JavaScript to rewrite all the links in the part of the HTML that contains the view, after it has loaded.

Subject: Not _blank, or is it?

If I got him right, “_blank” is just not the appropriate target name to use (whereas “blank” would do :wink: ). All documents should open in the same window …

Anyway, setting a base target would be a more elegant solution, if there are no navigational links.