[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Xpages Popup Window

Posted on 2010-08-18
5
Medium Priority
?
4,120 Views
Last Modified: 2013-12-18
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...
0
Comment
Question by:Bristan_Service_Desk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 33472625
Yes, the calculation is server side, but there are more tricks. Two solutions (at least):
- 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.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 33494176
Oh, and there is a third way: create an Iframe on the fly.
0
 
LVL 2

Accepted Solution

by:
jmaritz earned 2000 total points
ID: 33541871
Ok it works like this.
same as you just a small change to work in any database:
var _row:NotesXspViewEntry = rowData;
var _unid = _row.getUniversalID();
return  "0/" + _unid + "?OpenDocument";

then in the events\onClick enter the following code.
window.open(href,"_blank");
return false;

make sure it is Client Side Script

Opens a new window with your document in and leave the view as is.


event-onclick.JPG
0
 

Author Comment

by:Bristan_Service_Desk
ID: 33611164
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?
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 33614002
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
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question