RW_IMAGE_FUNCTION


Purpose

Creates an image button for an HTML document that invokes a JavaScriptClosed A programming language supported by most web browsers. Client-side JavaScript allows executable content to be included with web pages.  program. Outputs directly to RealWeb's RWC.OUTBUF buffer. Up to three images can be specified for display on the button (see also RW_IMAGE_ANCHOR).

Syntax

RW_IMAGE_FUNCTION(JSFunction, Description, aImageURLArray, aClass)

Parameters

JSFunction The JavaScript program to be run when the image is clicked.

Description Alternative text for the image (the text displayed if the image cannot be displayed).

aImageURLArray
A dynamic arrayClosed A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual containing up to 3 image URLs:

  • Element 1 specifies the default URLClosed Uniform Resource Locator - a web address.  for the image.
  • Element 2, if specified, is the URL of the image to be displayed when the mouse is over the image.
  • Element 3, if specified, is the URL of the image to be displayed when the user clicks on the image.

aClass A dynamic arrayClosed A multi-element string variable in which data is divided into elements by attribute marks, value marks and subvalue marks, matching the structure of a Reality file item. The entire array is referenced and stored as a single variable. For more information, refer to the Reality DataBasic Reference Manual that can contain the following elements:

Element No.

Attribute

Description

1

CLASS

The name of a tag class defined in a CSSClosed Cascading Style Sheet - a mechanism by which the presentation of an HTML page can be separated from the content. A style sheet can be used to determine the appearance of one or more HTML pages.  stylesheet.

2

ALT

Alternative text that is displayed instead of the image, if image display is not possible or disabled by the user.

This must be a text string of up to 1024 characters. It can contain entity references to special characters, but cannot contain any other sort of markup; in particular, no style tags are allowed.

Attributes defined in the aClass parameter are applied to the INPUT tag.

For information about using aClass, see The aClass Parameter.