HTML Screen Component provide a way to use raw HTML functionalities in Appway Screens (e.g. HTML native fields). This is a list of HTML components:
Warning: Using HTML Screen Components is not a best practice as they might make your Appway Solutions harder to maintain and upgrade. Several of these features can be achieved by using Appway components.
For deprecated HTML components and existing alternative components, see the
Feature Removal and Deprecation with Appway 7.1, 7.2, and 8.0 article.
HTML Body Script is used to inject Java Script or ECMA Script Code directly into the rendered Screen's <body> tag.
Properties tab:
- Code – Java Script code.
- Event – Event during which the code is to be executed. The existing options are:
- On Load executes when the HTML Screen loads.
- On Unload executes when the user closes the HTML Screen or navigates away from it by submitting the current Screen or entering a new address in the browser.
A Screen may contain multiple instances of HTML Body Script Components or inherit them from Templates or Includes used within the Screen. The Java Script code is assembled in the order in which the components appear in the Screen.
For information on Actions, see the Events and Actions article.
The HTML Head Link component is a <link> element that is injected into the <head> area of the resulting HTML Screen. This is mainly used to include CSS files.
Properties tab:
- Relation – Head Link's type, defaults to stylesheet. Other options include "copyright" to specify copyright owners, or "next," "prev," "top" or "up" to put the Screen into a hierarchy of Screens which some Internet browsers can show to the user.
- Type – Type of the linked element. Defaults to "text/css" as this is what is needed for stylesheets.
- URL – Address of the file the Head Link links to. Leave this empty if you set a Resource instead.
- Resource – Instead of using a URL, a Resource Business Object can be used as the target of the Head Link. Leave the URL address empty if you choose a Resource.
The HTML Head Script component is a <script> element that is injected into the <head> area of the resulting HTML Screen. Use this to define Java Script/ECMA Script functions. You can either link to an external file containing the code (use 'URL'), link to Code defined in a Resource Business Object (use 'Resource'), or specify code directly (use 'Code').
Properties tab:
- Language – Script's language. Defaults to 'Java Script'
- Type – Script's type. Defaults to 'text/javascript'
- URL – Address of a file containing Script code (if you use this, leave Resource and Code empty)
- Resource – Resource Business Object containing Script code (if you use this, leave URL and Code empty)
- Code – Code to be injected into the HTML Screen (if you use this, leave URL and Resource empty)
Use the HTML Head Style to generate hard-coded CSS Styles inserted into the rendered Screen's <head> area.
Properties tab:
- Type – Defaults to "text/css" for CSS Styles.
- Code – Actual CSS code that is written to the resulting Screen HTML.
- Media – Media the CSS style applies to. Can be left empty, but if the CSS should only be applied in certain cases, possible values for "Media" are "aural" (for speech synthesizers), "braille" (for tactile feedback devices), "handheld" (for handheld devices with small screens), "print" (to be applied when printing the Screen) or "projection" (to be applied during presentation). Please note that some browsers may ignore this property.
- Title – Description for the style.
The HTML Head Title components is the Screen title, shown in the browser window title.
Properties tab:
- Text – Text to be shown in the browser title bar.
The HTML Meta Tag component can be used to add a HTML meta tag to the page.
Properties tab:
- Name – name attribute value in the meta tag
- Content – content attribute value in the meta tag
- Http-equiv – http-equiv attribute value in the meta tag
This component has no visual output. However, a keyboard shortcut (like Ctrl+S or Ctrl+Shift+A ) can be registered to trigger Actions.
Properties tab:
- Ctrl – Whether the Control key has to be pressed
- Shift – Whether the Shift key has to be pressed
- Alt – Whether the Alt key has to be pressed
- Key – Which key has to be pressed to trigger the Actions
A Screen contains a Next and a Back button. Both buttons executed Screen Actions (configured in the Actions tab). The keyboard shortcuts Ctrl+N and Ctrl+B could be configured with the same Screen Actions to give the user the ability to navigate with keyboard shortcuts. Another common scenario is to define an Action to get executed when the user hits the Enter key.
For complete information on Actions, see the Events and Actions article.
Browsers also use keyboard shortcuts to trigger actions like opening a new window or printing the current page. Some browsers may not allow overwriting these shortcuts.