Home Search

DriveWorks Pro 23
URL/HTML

Send Feedback

URL/HTML

The URL/HTML property specifies the URL or HTML to display in the Web Frame control.

Property Type: Static

Default Value: No default value is applied to this property

Hierarchical Reference: ControlName.URL

To Change the Default Value

Ensure the property is a static property (It will display the gray orb alongside the property name).

The default value of the static property can be changed by:

  1. Click in the property for the control to be changed
  2. Type the required value.

A rule can also be built for this property by changing the type to dynamic.

See How To: Change A Static Property To A Dynamic Property.

Examples

Example 1

To display a web page from a site that allows embedding.

Rule

"https://www.microsoft.com"

Result

Renders the web page from www.microsoft.com to the control.

The control will display the message <URL> refused to connect when the site does not allow embedding.

Example 2

To display a resource from a Windows folder on a desktop application.

Rule

  • Local path (when running a single application only)
    "C:\DriveWorks\MyFiles\DataSheet.pdf"
  • Mapped Network location
    "M:\DriveWorks\MyFiles\logo.png"
  • UNC Network location
    "\\MachineName\DriveWorks\MyFiles\logo.png"
  • Location relative to the project file
    "..\GroupContent\logo.png"
  • Retrieve a URL when required (recommended)
    FsGetUrl("C:\DriveWorks\MyFiles\logo.png")

Result

Renders the image logo.png to the control.

The above are valid for a file that is accessible from a Windows folder when running a specification in a desktop application.

To display a file located in a Windows folder when running a specification in a browser see Example 3.

Example 3

To display a resource from a Windows folder in a browser.

This is the recommended method regardless of application being used. This method is valid for desktop applications and when run in a browser.

Rule

  • Static path to a UNC Network location
    FsGetUrl("\\MachineName\DriveWorks\MyFiles\DataSheet.pdf")
  • Dynamic path to a file created for a Specification
    FsGetUrl(DWSpecificationFullPath&"\Quotes\"&"Quote "&DWSpecification&".pdf")

Result

Renders the pdf file to the control and will retrieve a URL for the resource when running a specification in a browser.

This is the recommended method for displaying local resources in a Web Frame control.

See Displaying Files in a Browser for more information.

Example 4

To display a default web page from the DriveWorks Live theme.

Rule

"History"

Result

Will render the DriveWorks Live History page to the control (Only supported when running a specification in a browser).

URLs can be relative when directed to a default DriveWorks Live page.

For the Integration Theme see Default Web Pages

For the Web Theme see Default Web Pages

Example 5

To display raw HTML in the control.

Rule

"<!DOCTYPE html >
<html>
  <head>
  <meta charset='utf-8'>
  </head>
  <body>
        <h2>Example HTML</h2>
        <p>This is an example of HTML in the Web Frame Control.</p>
  </body>
</html>"

Result

Renders the given HTML to the control.

The first character (after the opening ") must be < for the Web Frame Control to recognize it is HTML being rendered, and not a URL.

Value set in Form Designer. Static properties can be made Dynamic by double clicking the gray radio button.