|
ION Script User's Guide: ION Script Tag Reference |
|
An ION_BUTTON is similar to an HTML button created with <INPUT TYPE="SUBMIT">. The ION_BUTTON is a special input type that can have an ION Script event assigned to it. When the button is pressed, or if the image is clicked for IMAGE type buttons, the event is processed. If the ION_BUTTON is contained in a form, only those inputs local to the form are passed on to the new page.
An ION_BUTTON can be either a standard HTML button or an image. If the TYPE is BUTTON, a standard button is used and the label comes from the LABEL attribute. IMAGE buttons get their visual representation from the URL specified in the SRC attribute.
When TYPE is set to IMAGE, you can retrieve the location of the mouse when clicked on the image by using the $Mouse.x and $Mouse.y system variables.
<ION_BUTTON
TYPE="BUTTON"
EVENT="eventName"
[LABEL="label"]
[METHOD={"GET" | "POST"}]
[<INPUT TYPE="SUBMIT"> attributes] />
or
<ION_BUTTON
TYPE="IMAGE"
EVENT="eventName"
SRC="url"
[BORDER="width"]
[METHOD={"GET" | "POST"}]
[<INPUT TYPE="IMAGE"> attributes] />
The width of the border drawn around the image. A value of 0 causes the image to be displayed without a border. The default value is 1, but this default can be changed on the "Images" tab of the ION Script Configuration utility (Windows), or in the "Images" section of the .ionsrc file (UNIX). This attribute is used only when TYPE is set to IMAGE. This attribute can contain a variable.
| Note <ION_BUTTON TYPE="IMAGE"> creates <INPUT TYPE="IMAGE">. Note that not all browsers support borders on <INPUT TYPE="IMAGE">. |
The name of the EVENT to execute when the user clicks the button. This name must be one of the names defined in the NAME attribute of an EVENT_DECL tag. This attribute can contain a variable.
The text that appears on the button face. This attribute can contain a variable.
The method used to submit form data. Valid values include:
If the ION_BUTTON is already contained in an ION_FORM, the METHOD attribute of ION_BUTTON is ignored and the METHOD attribute of ION_FORM is used instead.
Refer to an HTML/HTTP reference for more information on GET and POST.
The URL of the image to use for buttons of TYPE="IMAGE". See Specifying URLs. This attribute can contain a variable.
The button type. Specify BUTTON to create a standard HTML Submit button (created with the HTML tag <INPUT TYPE="SUBMIT">). Specify IMAGE to create an image that, when clicked, executes an event.
The ION_BUTTON tag is converted to the HTML <INPUT> tag. The TYPE attribute of the ION_BUTTON tag becomes the TYPE attribute of the <INPUT> tag. All attributes of the <INPUT> tag can be included in the ION_BUTTON tag, except for NAME and VALUE.
If the ION_BUTTON is not contained in an ION_FORM, a <FORM> tag is also created, and METHOD attribute of ION_BUTTON becomes the METHOD of the <FORM> tag. If the ION_BUTTON is already contained in an ION_FORM, the METHOD attribute of ION_BUTTON is ignored and the METHOD attribute of ION_FORM becomes the METHOD of the <FORM> tag.
If specified as
<ION_BUTTON TYPE="BUTTON" EVENT="event" LABEL="label"/>
then the ION_BUTTON tag is converted to the following HTML:
<INPUT TYPE="SUBMIT" NAME="event" VALUE="label">
The EVENT attribute becomes the NAME attribute of the <INPUT> tag, and the LABEL attribute becomes the VALUE attribute of the <INPUT> tag.
If specified as
<ION_BUTTON TYPE="IMAGE" SRC="url" EVENT="event" BORDER="1"/>
then the ION_BUTTON tag is converted to the following HTML:
<INPUT TYPE="IMAGE" NAME="event" BORDER="1" SRC="url">
The EVENT attribute becomes the NAME attribute of the <INPUT> tag.
IDL Online Help (March 06, 2007)