NetTalk Central

Author Topic: How to open a new browser window from code  (Read 3545 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
How to open a new browser window from code
« on: October 27, 2015, 10:52:25 AM »
A report procedure opens a new page (programatically) when done. Depending on whether the report was generated or not there's a choice of two different pages. If the report was generated I display it to the user and for this I'm using this code which works fine:

Quote
p_web.script('location.href="servedocument?docid=' & DOC:doc_id & '"')

The problem is that the browser just opens the new page but I want it to display the page in a new window (browser tab). Since location.href doesn't take a target parameter I'm lost here. Is there another way to accomplish what I want?

Peter

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: How to open a new browser window from code
« Reply #1 on: October 28, 2015, 08:48:42 PM »
Hi Peter,

So .. you have your main tab, a tab for the report (pdf?), and you want a third tab to be automatically created and sent to a url?

Would it be possible to give a little context as to the reasons why you want the new tab to be opened, that might help us a little.
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile