This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Sep 14, 2011, 11:49 AM
53 Posts
topic has been resolvedResolved

Button to open xPage as an agent keeps focus

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
I have a button on my xPage that opens another page that's set not to render, but runs some code and exports data to excel (although I assume what it's actually doing is not that important)
 
Once this has completed doing what it'sdoing no other buttons on the page work. I even have a search field and if I type and press enter (which normally works fine), it opens the same unrendered xPage again (exporting to excel in this case).
 
So, how do I get round this? I've tried setting Full update and no update, same thing happens
 
Cheers

Dan
Sep 14, 2011, 4:10 PM
129 Posts
Re: Button to open xPage as an agent keeps focus
I ran into the same problem a while back. The way I worked around it was to open the "file generator" page in a popup. Link with target="_blank". 
 
In most (all?) browsers, the popup closes after the user has selected what to do with the download.
Sep 14, 2011, 4:31 PM
53 Posts
Re: Button to open xPage as an agent keeps focus
Thanks, that's great. There's no way to add target=_blank to a button I assume? Otherwise I can either make my link look like a button or change things to links, not a big deal to be honest
Sep 14, 2011, 6:57 PM
129 Posts
Re: Button to open xPage as an agent keeps focus
No, but you can have client side script..
 
window.open( 'urlString' ) 
Sep 19, 2011, 11:37 AM
3 Posts
Re: Button to open xPage as an agent keeps focus
Or just reopen the xpage again from you ssjs after export took place

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal