Calcapp has supported adding website links since 2017, when we added support for formatted text to text boxes. Our new release adds two more ways to link to websites: browse buttons and the BROWSE action function both open the user’s web browser at a certain address.
When a link is opened on the web, the default behavior is for it to open in the current web browser window or tab. HTML allows this behavior to be customized, so that a link is opened in a new tab or window. This is known as the target of the link.
If the current page is running as part of a so-called iframe (which can be seen as a rectangular area of a host page that houses a different web page), HTML allows the link to replace the host page, instead of the default behavior, which is to just replace the current page residing in that rectangular box.
This is relevant, as apps created with Calcapp can be embedded in your website, and iframes are used to make that happen. Read on to learn more about how link targets are changing for embedded apps.
Browse buttons and the BROWSE function
The new browse button allows this behavior to be customized. Here are the inspector properties shown when a browse button is selected, with the new target property highlighted:
Here are the available options:
(The names have intentionally been chosen to match the
target attribute of
This is what the options mean:
|Use the app-wide link target setting. See below for more information.
|The link replaces the app (and just the app, if it has been embedded in another website.)
|The link is opened in a new web browser tab or window.
|The link replaces the page hosting the iframe element. If the app isn't embedded, the link is opened in a new web browser tab or window.
|The link replaces the top-most page hosting the iframe element. This is only different from Parent if the iframe hosting the app is itself hosted in another iframe.
|The link is opened in a web browser window or tab with a certain name (which is provided separately in the inspector). If a different link has previously been opened with a target name matching this link's target name, this link replaces the other link in the other tab or window.
The target property is a calculated property, meaning that it can be set through a formula. Refer to our documentation for that property for more information.
The BROWSE function also allows the target to be set. The linked page has more information on how to use the function.
(BROWSE is an action function and must be run through a formula button.)
Previously, all links opened in a new web browser window or tab (corresponding to the new Blank option). This made a lot of sense for stand-alone apps, which would otherwise have been replaced by the opened link.
However, this behavior caused issues for embedded apps. Links that were part of the app always opened in a new window or tab, which often was not the behavior used by the links on the host page. From a user’s perspective, the difference in behavior made little sense.
With our our new release, the default behavior differs depending on if the app is running stand-alone or embedded in a host page. For stand-alone apps, the default behavior remains for links to open in a new window or tab (the Blank option above). For embedded apps, the new default behavior is for links to replace the top-most host page (the Top option above).
(Whether an app is considered to be embedded is related to how it’s used and not to the plan it’s on.)
The default behavior can be customized in the inspector when the start screen is shown (press the button until you reach it):
The only way to determine where text box links open is through this setting. Browse buttons and the BROWSE function default to using this setting, but allow the behavior to be customized on a per-button or per-function basis.
Newly-created apps use the new default behavior, described above. However, apps created using a prior version of Calcapp retain the old behavior of all links opening in a new window or tab, meaning that this setting must be changed manually if you’d prefer the new behavior.