Application.Navigate always goes to new tab

While TMS Webcore is an excellent product, the documentation is very disappointing.

The help says this about Application.Navigate

Method to navigate from the application to a given URL. With the ATarget parameter it can be set to navigate to the URL in a new browser window or in the window where the current application is running.

I figured, just like html, a blank/null parameter would make it run the url in the same tab. But it runs in a new tab. What do I pass to make it run in the same tab ?

Hmmm. It looks like Application.Navigate takes two parameters - a URL and a navigation target. The navigation target can either be ntBlank to open in a new tab, or ntPage to open in the current tab.

// Open link in new tab
Application.Navigate('', ntBlank);

// Open link in current tab
Application.Navigate('', ntPage);

Does that help?

if you type Application.Navigate( into your function, you'll see that TNavigationTarget is the type for the second parameter. Then, if you type TNavigationTarget. as you're filling in the second parameter, you'll see these options appear as part of the code completion that pops up. A good trick to use when you're curious about what options are available for methods or types that you might not have used before. Usually much quicker (and more accurate) than hunting through documentation.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.