I guess I should update the method signature for that page!
Anyway, you cannot open a new window (or tab) from code. A new window can be opened by a user clicking on a WebLabel by setting the Target property to “New Window”.
[quote=157254:@Michel Bujardet]In a button :
Sub Action()
ExecuteJavaScript(“window.open(”“http://www.w3schools.com”");")
End Sub
[/quote]
Keep in mind that this will only work if the user has not popup blocker on their browser. Otherwise, opening a new window requires the code being executed in direct response to a user clicking a button or a link (in the same event loop).
Sure. In the example I posted above, just put the URL of your app. To show a particular page, use an URLParameter and check in Session.Open which page should be displayed.
You do not need JavaScript if you use a Link and set the target to ‘New Window’.
Note that the page displayed in the new window, or tab if there were already other tabs open, will start a new session. So if you want the new page to communicate with the previous one, you will have to do some extra work.
Thanks @Michel Bujardet !
But, as you said, it’s a another session and the authentification has to be done again…
I was searching for a new window using the same session, but this is probably impossible
[quote=213778:@ValryTarondeau]Thanks @MichelBujardet !
But, as you said, it’s a another session and the authentification has to be done again…
I was searching for a new window using the same session, but this is probably impossible :([/quote]
No, it is not possible to go to the same session. But as I showed you, you can bypass authentication and go directly to a page. If you want to make sure the new page is authorized, you may use another parameter to carry an encrypted token that will allow you in the newly opened page that it really comes from the original app.
Check the PushExample in Web for a way to communicate between sessions.