Home Search

DriveWorks Pro 23
Web Frame

Send Feedback

Web Frame

The Web Frame control provides a frame that allows external web content, such as a web page or a PDF file, to be rendered onto a user form.

Information

Z-Index

The Z index of a Web Control is ignored when running a specification in a desktop application (DriveWorks Administrator or User).

The Web control will always appear in front of any other control placed in front of it.

However when running a specification in a browser (using DriveWorks Live) the Z order is honoured.

See Order by Z-Index for more information.

Form Refresh in a Browser

When running a specification in a browser (through DriveWorks Live) and the user form refreshes, the browser may reload the web page.

Reloading will occur when (for example):

  • Form control values change
  • Manually refreshing (hitting the F5 key)
  • Re-orientating a tablet or mobile device

This will cause unexpected behavior such as:

  • Browsing to a different page within the control will reload the current value for the URL/HTML property.
  • Media being played within the Web Frame control will re-start.

Displaying Web Sites in a Browser

When the Web Frame control is used to display a web site, please note the following.

Browser Behavior

When the URL/HTML property changes dynamically some browsers will load the previous URL displayed in the Web Frame control if the new URL fails to load.

This has been observed in certain versions of Google Chrome.

3rd Party Cookies

Avoid using URLs that load content from sites that rely on 3rd Party Cookies. Some browser settings prevent these from working.

Protocol

It is important the following notes on protocol are adhered to.

  • The URL/HTML property requires prefixing with the protocol (http or https) the website uses.

    For example: https://www.microsoft.com

  • When running a specification in a browser the protocol given in the URL/HTML property must match the protocol of the DriveWorks Live site.

    If the DriveWorks Live site uses https only https URLs can be used.

    Mixed Active Content (displaying a http web page when the DriveWorks Live site uses https or vice versa) is a potential security risk and will be blocked by browsers.

    The external TinyWebGallery blog Why you should not mix http and https when using iframes explains this in detail.

Displaying Files in a Browser

In addition to web pages and raw HTML, the Web Frame control allows files of different formats to be displayed on a user form, such as:

  • Image files (.png, .jpg, .svg, etc.)
  • Portable document format (.pdf)

However, when using any of these formats the following should be noted depending on where a specification is being run from:

  • Running a specification from a desktop application

    Files can be referenced by giving a Windows folder path (local path, mapped network path, UNC path, etc.).

    However we recommend always using the FSGetURL function to display files in the Web Frame control.

    See URL/HTML property - Example 2 for examples.

  • Running a specification from a browser

    Consideration should be given if a specification is ever to be run in a browser (through DriveWorks Live) as files displayed in the Web Frame control require a URL (not a Windows folder).

    Security restrictions in browsers will prevent local resources from being loaded.

    To overcome this, the function FSGetURL retrieves a URL for the given file to be displayed in a browser. This can be used regardless of where the specification is run from.

    See URL/HTML property - Example 3 for examples.

Properties

Behavior

  • Enabled

    Controls whether the control is enabled (if the result is TRUE) or disabled (if the result is anything other than TRUE, e.g. FALSE).

  • Error Result

    Determines whether the value of the control is in error. The result of this rule is a string containing the error message if the value is in error, otherwise a blank string or the number zero.

  • Tab Index

    Configures the position of the control in the form tab order.

  • URL/HTML

    Specifies the URL to navigate to, or the HTML string to render in the control. This property will automatically detect whether the specified value is a URL or HTML string. URL strings must include the protocol, e.g. http or https

  • Visible

    Determines whether the control is visible (TRUE) or hidden (FALSE).

General

  • (Metadata)

    Optional text which can be used to provide information belonging to or about a control. For example, a list of CSS classes which can be parsed and applied to the control using the Integration Theme in DriveWorks Live. This doesn't affect the control's behavior.

  • (Name)

    The name of the control

  • (Tag)

    Optional text which can be used to describe the control, but which doesn't affect the control's behavior.

  • Tooltip Duration

    Controls the duration, in seconds, for which the tooltip will remain visible. Values of 0 and below indicate an infinite duration.

  • Tooltip Text

    Specifies the text to display in a tooltip when hovering over the control.

Layout

  • Height

    Controls the height of the control.

  • Left

    Controls the left position of the control.

  • Top

    Controls the top position of the control.

  • Width

    Controls the width of the control.

A user form control that allows external web content to be rendered onto a user form.