Bristan_Service_Desk
asked on
Xpages Popup Window
Hi all
I've recently started to play with Xpages within Notes 8.5 and have knocked up a little xpage that shows call awaiting allocation within our service desk system with a link to open the call. The link opens the standard web enabled form, not an Xpage using the following code set in the data\pageUrl section of All Properties within the view panel column:
var _row:NotesXspViewEntry = rowData;
var _unid = _row.getUniversalID();
return "http://server/database.nsf/0/" + _unid + "?OpenDocument";
My question is this, how can I get the document to open in a 'new' window so that the user does not navigate away from the Xpage? I'm guessing the javascript will need to be client side but the only option for the above is server side...
I've recently started to play with Xpages within Notes 8.5 and have knocked up a little xpage that shows call awaiting allocation within our service desk system with a link to open the call. The link opens the standard web enabled form, not an Xpage using the following code set in the data\pageUrl section of All Properties within the view panel column:
var _row:NotesXspViewEntry = rowData;
var _unid = _row.getUniversalID();
return "http://server/database.nsf/0/" + _unid + "?OpenDocument";
My question is this, how can I get the document to open in a 'new' window so that the user does not navigate away from the Xpage? I'm guessing the javascript will need to be client side but the only option for the above is server side...
Oh, and there is a third way: create an Iframe on the fly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's just what I was looking for.......however, just to be a pain, is it possible to pop the window in a new 'tab' instead of a window?
It is down to the browser and settings afaik, e.g. for IE the tabbed browsing settings - http://helpdeskgeek.com/how-to/force-ie-to-open-link-in-new-tab/ . You can only direct into a new window (_blank) or the same window etc.
Steve
Steve
- javascript window.open()
- a link with a target
In both cases you have to generate HTML code. The first method is blocked nowadays by many browsers, plus it's a little more complex, so here's the idea how to handle the second one.
Create a view column of content type HTML, with the following formula:
base:=@Subset(@DbName; -1);
html:=html + "<a href=\"/" + base + "/0/" + _unid + "?OpenDocument\" target=\"_blank\">";
html:=html + subject;
html:=html + "</a>";
html
Or similar in SSJS.