K2: How may I open a file in a new window unless I already have such a window open? -
K2: How may I open a file in a new window unless I already have such a window open? -
i have k2 smartform displays list of file names. when user clicks file name, programme opens file (all of them pdfs) in new tab in browser (ie). far. if click on sec file list, opens in 3rd tab. not user wants.
they want sec file selection open in same window first file.
this process can see:
click on file in list. open in tab. click on sec file in list. if there tab open file list, open file there. otherwise, open new tab file.i suppose automatically closing first tab when click on sec file accomplish same thing.
how can done?
when deal opening links, first of all, can limited. indeed, browsers (ie, chrome, etc...) can configured users open links in new tabs, windows, etc... , form developer cannot alter that.
i have made jsfiddle reproduce situation , propose solution can test. don´t guaranty work utilize mac describe improve solution below.
you can find here: https://jsfiddle.net/chevdor/45k40npv/
i guess first illustration (#1) happens @ moment. using 'target' attribute, tried implement solution may work you. click on #2 , #3 , check whether work. cannot test since utilize mac.
you can read more target attribute here:
http://www.w3schools.com/tags/att_a_target.asp
another solution give more command utilize iframe control. think comes in standard smartforms now. if not, can sure community site. recommend create new view iframe , define 1 parameter (string) called "url".
let´s speak in k2 rules languages :) "when parameter changed", "and parameters defined", if 'transfer data' passing url iframe control, display doc. if user clicks document, update same iframe. solution, no tab ever involved.
please note work great document supported browser. types may require plugin. other documents (ie zip, etc..) not appear downloaded instead.
i hope helps. best regards, -chevdor
k2
Comments
Post a Comment