ModernJava
http://www.modernminds.com
I mageURLButtonBar Parameters

The following is an example of an HTML APPLET tag for the ImageURLButtonBar applet with all possible parameters specified (in normal use, all of these parameters are not required). You can click the parameter name to jump directly to a description of the parameter.

Parameters in bold type are required parameters, while all other parameters are optional.

Note that the VALUEs in the PARAM tags are shown for illustrative purposes only: they are not meant to be interpreted as parameter requirements.


<APPLET CODE="ImageURLButtonBar.class" WIDTH="360" HEIGHT="28">
<PARAM NAME="base" VALUE="Base.GIF">
<PARAM NAME="useCodeBase" VALUE="false">
<PARAM NAME="mouseOver" VALUE="MouseOver.GIF">
<PARAM NAME="mouseOver2" VALUE="MouseOver2.GIF">
<PARAM NAME="mouseDown" VALUE="MouseDown.GIF">
<PARAM NAME="buttonsDisabled" VALUE="Disbl.GIF">
<PARAM NAME="orient" VALUE="h">
<PARAM NAME="stick" VALUE="false">
<PARAM NAME="background" VALUE="Background.JPG">
<PARAM NAME="barXPos" VALUE="10">
<PARAM NAME="barYPos" VALUE="5">
<PARAM NAME="buttonBorders" VALUE="all">
<PARAM NAME="borderColorTL" VALUE="FFFFFF">
<PARAM NAME="borderColorBR" VALUE="888888">
<PARAM NAME="borderIntensity" VALUE="50">
<PARAM NAME="borderSize" VALUE="2">
<PARAM NAME="downShift" VALUE="true">
<PARAM NAME="downShiftAmt" VALUE="1">
<PARAM NAME="baseBrighten" VALUE="10">
<PARAM NAME="baseBrightenTint" VALUE="330000">
<PARAM NAME="mouseOverBrighten" VALUE="20">
<PARAM NAME="moBrightenTint" VALUE="004444">
<PARAM NAME="mouseDownBrighten" VALUE="35">
<PARAM NAME="mdBrightenTint" VALUE="3527af">
<PARAM NAME="mdBrightenAll" VALUE="true">
<PARAM NAME="buttonsDisabledDim" VALUE="25">
<PARAM NAME="grayBarBrighten" VALUE="10">
<PARAM NAME="frameRate" VALUE="250">
<PARAM NAME="disableBadURL" VALUE="true">
<PARAM NAME="mouseEnterAudio" VALUE="Enter.au">
<PARAM NAME="mouseClickAudio" VALUE="Click.au">
<PARAM NAME="buttonDownAudio" VALUE="Select.au">
<PARAM NAME="button1Start" VALUE="0">
<PARAM NAME="button1Size" VALUE="40">
<PARAM NAME="button1URL" VALUE="http://www.mysite.com">
<PARAM NAME="button1Target" VALUE="Content">
<PARAM NAME="button1Desc" VALUE="My Web Site">
</APPLET>

P arameter Descriptions

Each of the parameters for the ImageURLButtonBar applet is described in detail in this section.

APPLET tag

A few of the more commonly used attributes for the applet tag are described below.


WIDTH="pixels"
HEIGHT="pixels"

These required attributes give the width and height (in pixels) of the button bar display area. These values should match the size of the button bar, or the size of the background (if the background image is used).

Note: the applet WIDTH and HEIGHT attributes are used by the applet to determine if the button bar has a vertical or horizontal orientation. If the applet size is wider than it is high, then the button bar is assumed to have a horizontal orientation; otherwise, the button bar is assumed to have a vertical orientation.


CODEBASE="codebaseURL"

This optional attribute specifies the base URL of the applet -- the directory that contains the applet's code. If this attribute is not specified, then the document's URL is used.

CODE="appletFile"

This required attribute gives the name of the file that contains the applet's compiled Applet subclass. This file is relative to the base URL of the applet. It cannot be absolute. This attribute should be set as: CODE="ImageURLButtonBar.class"

ALT="alternateText"

This optional attribute specifies any text that should be displayed if the browser understands the APPLET element but cannot run applets written in Java.

ALIGN="alignment"

This optional attribute specifies the alignment of the applet. The possible values of this attribute are the same as those for the IMG element: left, right, top, texttop, middle, absmiddle, baseline, bottom, absbottom.

VSPACE="pixels"
HSPACE="pixels"

These option attributes specify the number of pixels above and below the applet (VSPACE) and on each side of the applet (HSPACE). They're treated the same way as the IMG element's VSPACE and HSPACE attributes.
base

This is a required parameter.

This is the file name of the GIF or JPEG image file for the base button bar.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file).

The base button bar contains button images that are displayed when the mouse is not within a button's boundaries.

Note that the button bar will become functional as soon as the base button bar is loaded (if a background image is specified, then both the base and the background image must be loaded before the button bar will become functional). By "functional" what is meant is that the base state for buttons will be displayed, and that if a button is clicked then the assigned URL will be loaded. Button images for other button states will be available only after all of the other specified image files have been loaded.
useCodeBase

If this parameter is omitted or has a value of "false", then the applet will look for the button bar image files beginning in the directory where the HTML file is located.

If the value for this parameter is "true", then the applet will look for the button bar image files beginning in the directory where the Java class files are located.
mouseOver

This is the file name of the GIF or JPEG image file for the mouseOver button bar.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file), unless the useCodeBase parameter has a value of "true" (in which case the path root is based on the URL of the Java class files).

The mouseOver button bar contains button images that are displayed when the mouse is moved within a button's boundaries.

If this parameter is not specified, then the applet will use the base image as the mouseOver image, and a grayscale version of the base image as the base button bar image (see also the grayBarBrighten parameter).
mouseOver2

This is the file name of the GIF or JPEG image file for the mouseOver2 button bar. The mouseOver2 button bar is used for button animation only.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file), unless the useCodeBase parameter has a value of "true" (in which case the path root is based on the URL of the Java class files).

If an image file is specified for this parameter, then when the mouse is moved within a button's boundaries the button will be animated by alternating between the button image on the mouseOver bar and the button image on the mouseOver2 bar. The rate at which the images are alternated is determined by the frameRate parameter.

If this parameter is not specified, then no button animation will be performed.
mouseDown

This is the file name of the GIF or JPEG image file for the mouseDown button bar.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file), unless the useCodeBase parameter has a value of "true" (in which case the path root is based on the URL of the Java class files).

The mouseDown button bar contains button images that are displayed when the mouse is moved within a button's boundaries and clicked. The image is displayed as long as the mouse button is held down.

If this parameter is not specified, and if button borders are not used (see the buttonBorders parameter, then the applet will "brighten" the mouseOver button bar image for use as the mouseDown button bar image by the percentage specified by the mouseDownBrighten parameter.
buttonsDisabled

This is the file name of the GIF or JPEG image file for the buttonsDisabled button bar.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file), unless the useCodeBase parameter has a value of "true" (in which case the path root is based on the URL of the Java class files).

The buttonsDisabled button bar contains button images that are displayed when a button is disabled. For this applet, buttons are only disabled when the buttonURL parameter is invalid and when the disableBadURL parameter is "true" or unspecified.

If this parameter is not specified, then the applet will "darken" the base button bar image for use as the buttonsDisabled button bar image by the percentage specified by the buttonsDisabledDim parameter.
orient

Normally, the applet will automatically establish the orientation of the button bar based on the applet's dimensions. If the width of the button bar is greater than its height, then the button bar is assumed to have a horizontal orientation. If the height is greater than the width, then the applet is assumed to have a vertical orientation.

Occasionally, this method of determining the button bar's orientation might not be correct. In these cases, you can manually specify the button bar orientation by using the orient parameter.

A parameter value of "h" will tell the applet that the button bar has a horizontal orientation, while a parameter value of "v" will tell the applet that the button bar is orientated vertically.

If this parameter is not specified, then the applet will automatically determine the button bar's orientation.
stick

If this parameter is set to "true", then when a button on the button bar is clicked it will "stick" in the button down position until another button is clicked. This can be useful if the button bar is in a frame and is used for site navigation (for example). The user can easily see what button (i.e. what page) that he/she last selected.

If this parameter is set to a button number (i.e., stick="1" would correspond to the first button on the button bar), then that button will be "stuck" in the button down position when the button bar initializes.

If a value for this parameter is not specified, then the the value will default to "false" (buttons will not "stick", but rather will pop-up as soon as the mouse button is released).
background

This is the file name of the GIF or JPEG image file that is displayed behind the button bar.

If a path to the image file is specified, then the path root is based on the document's URL (i.e., the location of the web page's HTML file), unless the useCodeBase parameter has a value of "true" (in which case the path root is based on the URL of the Java class files).

When the button bar is displayed, the background image (if specified) is drawn first, then the button bar is drawn on top of the background image. This can be useful, for instance, if you wish to surround your button bar with a custom graphic, such as a frame.

The position of the button bar on the background image is specified by the barXPos and barYPos parameters.

If this parameter is not specified, then the applet will not draw a button bar background.
barXPos

This parameter is only used if the background parameter is specified.

The barXPos parameter is used to position the button bar horizontally on the background image.

The left edge of the background image is at position 0 (zero).

If a background image is specified but the barXPos parameter is not specified, then the value for barXPos defaults to zero.
barYPos

This parameter is only used if the background parameter is specified.

The barYPos parameter is used to position the button bar vertically on the background image.

The top edge of the background image is at position 0 (zero).

If a background image is specified but the barYPos parameter is not specified, then the value for barYPos defaults to zero.
buttonBorders

This parameter controls whether borders are drawn around buttons.

The four valid values for this parameter are (these values are case sensitive):
  • "all" - borders are drawn around the buttons on all button bars


  • "none" - borders are not drawn around buttons


  • "base" - borders are drawn around buttons on the base button bar only


  • "other" - borders are drawn around buttons on all button bars except the base button bar
If button borders are drawn, then the border characteristics are determined by the parameters borderColorTL, borderColorBR, borderIntensity, and borderSize.

If a value for this parameter is not specified, then the parameter value will default to "none".
borderColorTL

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by the borderIntensity parameter. However, it is possible to manually specify a solid color to use when drawing a border.

This parameter allows you to manually specify the color used to draw the top and left button borders.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
borderColorBR

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by the borderIntensity parameter. However, it is possible to manually specify a solid color to use when drawing a border.

This parameter allows you to manually specify the color used to draw the bottom and right button borders.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
borderIntensity

Normally, button borders (see the buttonBorders parameter) are drawn by "lightening" or "darkening" the borders around a button image by the percentage specified by this parameter.

Lightening and darkening button borders instead of using solid colors can result in some interesting effects as the image itself becomes part of the border.

If you prefer to manually specify solid border colors, see the borderColorTL and the borderColorBR parameters.

The value for this parameter must be between "0" and "100" percent.

If a value for this parameter is not specified, then the value will default to "50" percent.
borderSize

If borders are drawn for buttons (see the buttonBorders parameter), then this parameter will determine the width of the border that surrounds each button.

If a value for the borderSize parameter is not specified, then the value will default to "1".
downShift

When the mouse is clicked while over a button, then the mouseDown image is displayed. In addition to displaying the mouseDown image, you can also specify that the button image be offset or "shifted" down and to the right. This gives the illusion that the button has been depressed.

If this parameter is assigned a value of "true", then when the mouse is clicked on a button it will be shifted down and to the right by the number of pixels specified by the downShiftAmt parameter. Note that downShift can be enabled regardless of whether borders (see the buttonBorders parameter) are being drawn for the buttons or not.

One thing to bear in mind when using the downShift parameter is that the downShift effect is produced by copying the button image, moving it down and to the right, then drawing it over the original button image. In some circumstances portions of the original image might be left in the border region resulting in a less-than-desirable appearance. In this situation, it is recommended that you use solid color borders (see the borderColorTL and borderColorBR parameters).

This parameter's value can be either "true" or "false". If the parameter is not assigned a value, then the value will default to "false" (buttons will not be shifted).
downShiftAmt

If buttons are shifted down and to the right when they are clicked (see the downShift parameter), then this parameter will determine the number of pixels that the button will be shifted.

If a value for the downShiftAmt parameter is not specified, then the value will default to the value of the borderSize parameter.
baseBrighten

If the value of this parameter is greater than zero, then the "brightness" of the base button bar will be increased by the specified percentage.

If the value of this parameter is less than zero, then the "brightness" of the base button bar will be decreased by the specified percentage.

If a value for this parameter is not specified, then the brightness of the base button bar will remain unchanged.

Note that the value for this parameter may be less than "-100" or greater than "100", but a point will be reached (depending on the colors being brightened) when decreasing or increasing the parameter value will have no effect.
baseBrightenTint

This parameter is a color that is used to"tint" the base button bar when it is "brightened" (see also the related baseBrighten parameter).

For instance, if you want to give the base button bar a reddish tint, then you might specify the tint color:

<PARAM NAME="baseBrightenTint" VALUE="330000">

It is important to note that in order to tint the button bar, the baseBrighten parameter must be assigned a value other than zero (the value can be positive or negative).

Also, note that tinting is an additive process. This means that if you use a bright tint color, then the original colors in the button bar will be brightened. It might be necessary to specify a negative value for the baseBrighten parameter in order to prevent the button bar from having a "washed out" appearance (note that a quot;washed out" appearance can in some cases be a desirable effect).

The tinting process is performed internally by adding the RGB values of the tint color to the RGB values of each pixel in the base button bar image. The resulting image is then "brightened" by the percentage specified by the baseBrighten parameter.

For instance, suppose that the base button bar is a solid red color ("ff0000") and a green tint value is specified ("00ff00"). In this case the resulting base button bar color would be yellow ("ff0000" + "00ff00" = "ffff00"). This resulting yellow would then be "brightened" by the percentage specified by the baseBrighten parameter.

Usually a small tint value will yield the best results. For instance, a red only tint value of "180000" will appear nearly black on it's own, but when added to the colors in the button image will result in the button image having a reddish tint. If a larger red value was used, for instance "ff0000", the button would probably appear far too red (large values can, however, be useful). The moral is, start small and then increase the tint color value a little at a time until the desired effect is achieved. Also, don't forget to experiment with adjusting the baseBrighten parameter value in combination with the baseBrightenTint parameter value.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
mouseOverBrighten

If the value of this parameter is greater than zero, then the "brightness" of the mouseOver button bar will be increased by the specified percentage.

If the value of this parameter is less than zero, then the "brightness" of the mouseOver button bar will be decreased by the specified percentage.

If a value for this parameter is not specified, then the brightness of the mouseOver button bar will remain unchanged.

Note that the value for this parameter may be less than "-100" or greater than "100", but a point will be reached (depending on the colors being brightened) when decreasing or increasing the parameter value will have no effect.
moBrightenTint

This parameter is a color that is used to"tint" the mouseOver button bar when it is "brightened" (see also the related mouseOverBrighten parameter).

For instance, if you want to give the mouseOver button bar a reddish tint, then you might specify the tint color:

<PARAM NAME="moBrightenTint" VALUE="330000">

It is important to note that in order to tint the button bar, the mouseOverBrighten parameter must be assigned a value other than zero (the value can be positive or negative).

Also, note that tinting is an additive process. This means that if you use a bright tint color, then the original colors in the button bar will be brightened. It might be necessary to specify a negative value for the mouseOverBrighten parameter in order to prevent the button bar from having a bright "washed out" appearance (note that a "washed out" appearance can in some cases be a desirable effect).

The tinting process is performed internally by adding the RGB values of the tint color to the RGB values of each pixel in the mouseOver button bar image. The resulting image is then "brightened" by the percentage specified by the mouseOverBrighten parameter.

For instance, suppose that the mouseOver button bar is a solid red color ("ff0000") and a green tint value is specified ("00ff00"). In this case the resulting mouseOver button bar color would be yellow ("ff0000" + "00ff00" = "ffff00"). This resulting yellow would then be "brightened" by the percentage specified by the mouseOverBrighten parameter.

Usually a small tint value will yield the best results. For instance, a red only tint value of "180000" will appear nearly black on it's own, but when added to the colors in the button image will result in the button image having a reddish tint. If a larger red value was used, for instance "ff0000", the button would probably appear far too red (large values can, however, be useful). The moral is, start small and then increase the tint color value a little at a time until the desired effect is achieved. Also, don't forget to experiment with adjusting the mouseOverBrighten parameter value in combination with the moBrightenTint parameter value.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
mouseDownBrighten

In the case where a mouseDown button bar is not specified, and buttonBorders are not enabled, then the mouseDown button bar will be created by "brightening" the mouseOver button bar image. This parameter is used in creating the mouseDown button bar image.

Alternately, it is possible to brighten the mouseDown button bar in all situations (instead of only when the conditions described above are met). See the mdBrightenAll parameter for further information.

If the value of this parameter is greater than zero, then the "brightness" of the mouseDown button bar will be increased by the specified percentage.

If the value of this parameter is less than zero, then the "brightness" of the mouseDown button bar will be decreased by the specified percentage.

If a value for this parameter is not specified, then the brightness of the mouseDown button bar will default to "35" if there is no mouseDown button bar image, or the brightness will remain unchanged if a mouseDown button bar was specified.

Note that the value for this parameter may be less than "-100" or greater than "100", but a point will be reached (depending on the colors being brightened) when decreasing or increasing the parameter value will have no effect.
mdBrightenTint

This parameter is a color that is used to"tint" the mouseDown button bar when it is "brightened" (see also the related mouseDownBrighten and mdBrightenAll parameters).

For instance, if you want to give the mouseDown button bar a reddish tint, then you might specify the tint color:

<PARAM NAME="mdBrightenTint" VALUE="330000">

It is important to note that in order to tint the button bar, the mouseDownBrighten parameter must be assigned a value other than zero.

Also, note that tinting is an additive process. This means that if you use a bright tint color, then the original colors in the button bar will be brightened. It might be necessary to specify a negative value for the mouseDownBrighten parameter in order to prevent the button bar from having a "washed out" appearance (note that a quot;washed out" appearance can in some cases be a desirable effect).

The tinting process is performed internally by adding the RGB values of the tint color to the RGB values of each pixel in the mouseDown button bar image. The resulting image is then "brightened" by the percentage specified by the mouseDownBrighten parameter.

For instance, suppose that the mouseDown button bar is a solid red color ("ff0000") and a green tint value is specified ("00ff00"). In this case the resulting mouseDown button bar color would be yellow ("ff0000" + "00ff00" = "ffff00"). This resulting yellow would then be "brightened" by the percentage specified by the mouseDownBrighten parameter.

Usually a small tint value will yield the best results. For instance, a red only tint value of "180000" will appear nearly black on it's own, but when added to the colors in the button image will result in the button image having a reddish tint. If a larger red value was used, for instance "ff0000", the button would probably appear far too red (large values can, however, be useful). The moral is, start small and then increase the tint color value a little at a time until the desired effect is achieved. Also, don't forget to experiment with adjusting the mouseDownBrighten parameter value in combination with the mdBrightenTint parameter value.

The value for this parameter must be a RGB value in hexadecimal format. For instance, the color red would be "FF0000", and a medium gray would be "888888".
mdBrightenAll

In situations where buttonBorders are specified for the mouseDown button bar buttons, then normally the mouseDownBrighten and mdBrightenTint parameters are ignored.

If you would like the mouseDown buttons to be brightened (and optionally tinted) in all situations, then you will need to set the mdBrightenAll parameter to true.

If a value is not specified for this parameter, then the parameter's value defaults to false.
buttonsDisabledDim

When a button is disabled, the applet will display the button image from the buttonsDisabled button bar. In the case where the buttonsDisabled button bar is not specified, then the base bar is "dimmed" or "darkened" by the percentage given by this parameter.

Note that this applet will only disabled a button if the URL for the button (the buttonXXURL parameter) has been entered incorrectly, and if the disableBadURL parameter has been set to "true".

If the value for this parameter is greater than zero, then the grayscale base bar is "brightened" by the specified percentage. If the value is less than zero, then the grayscale base bar is darkened by the specified percentage.

The value for this parameter must be between "-100" (brightest) and "100" (darkest) percent.

If no value is specified for this parameter, then its value defaults to "25".
grayBarBrighten

In the case where a mouseOver button bar is not specified, then the base bar becomes the mouseOver bar and a grayscale version of the new mouseOver bar becomes the base bar. This parameter is used in creating the new grayscale base bar.

If the value for this parameter is greater than zero, then the grayscale base bar is "brightened" by the specified percentage. If the value is less than zero, then the grayscale base bar is darkened by the specified percentage.

Note that only color values are processed (using a weighted algorithm) by the percentage specified by this parameter -- gray values are not brightened or darkened.

Remember, this parameter is only used when the applet finds it necessary to create a grayscale base bar (i.e., when no mouseOver bar has been specified).

The value for this parameter must be between "-100" and "100" percent.

If no value is specified for this parameter, then its value defaults to "0".
frameRate

When a mouseOver2 button bar is specified, then two-frame animation will be performed when the mouse is moved within a button's boundaries. This parameter sets the delay (in milliseconds) that takes place between each frame of animation.

Animation is performed by alternating between the button's image on the mouseOver bar and the button's image on the mouseOver2 bar.

Note that if a mouseOver2 bar is not specified, then this parameter will be ignored.

If no value is specified for this parameter, then its value defaults to "250" (one quarter of a second).
disableBadURL

If a badly formed URL is set for a button (see the buttonXXURL parameter), normally the applet will display the buttonsDisabled image for the button, or dim the button if a buttonsDisabled button bar was not specified.

In some situations it may be desirable to have the button enabled, even though the entered URL for the button is not valid. For instance, you might want to create a demonstration web page that allows the user to click the buttons on the page, but does not cause a new page to be loaded when a button is clicked. In this case, you can omit the button
XXURL tag for each button and set the disableBadURL parameter to "false".

The value for this parameter can be either "true" or "false". If a parameter value is not specified, the the value defaults to "true".
mouseEnterAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse is moved within a button's boundaries.

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
mouseClickAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse button is pressed down (as opposed to releasing the mouse button) while it is within a button's boundaries.

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
buttonDownAudio

This optional parameter is used to specify the file name of an AU audio clip file that will be played each time that the mouse button is released after being pressed down within a button's boundaries. (The parameter is called buttonDownAudio because the audio file is played when the button has been activated, or in other words, has been cycled through the "down" state.)

Due to applet security restrictions, the audio clip path is based starting with the directory where the Java code is located (as opposed to starting with the directory where the HTML page is located).

Note that the applet does not support WAV or other audio file formats. There are a number of utilities available that can be used to convert audio files to AU format.
buttonXXStart

The position of each button on your button bar is defined by the buttonXXStart and the buttonXXSize parameters.

Each button bar button is uniquely identified by the "XX" portion of the parameter name. For instance, if you have three buttons on the button bar, the parameter name for the button 1 starting position would be "button1Start", the button 2 starting position parameter name would be "button2Start", and button 3 starting position parameter name would be "button3Start". One button
XXStart parameter is required for each and every button that you wish to define on the button bar. (Note that the XX portion of the buttonXXStart parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXStart").

The start location specified by the button
XXStart parameter corresponds to the location of the left edge (in the case of horizontal button bars) or top edge (in the case of vertical button bars) of the button being defined. For instance, suppose that there are three buttons on a horizontal button bar. Each button is 20 pixels wide and the buttons are arranged edge-to-edge. The value for the button1Start parameter would be "0" (the left-most edge of the button bar), button2Start would be "20" ( = 0 + 20), and button3Start would be "40" ( = 20 + 20).

Remember that the button
XXStart parameter tells the applet what location on the button bar (measured from the left or top edge) that the button begins.
buttonXXSize

The position of each button on your button bar is defined by the buttonXXSize and the buttonXXStart parameters.

Each button bar button is uniquely identified by the "XX" portion of the parameter name. For instance, if you have three buttons on the button bar, the button 1 size parameter name would be "button1Size", the button 2 size parameter name would be "button2Size", and the button 3 size parameter name would be "button3Size". One button
XXSize parameter is required for each and every button that you wish to define on the button bar. (Note that the XX portion of the buttonXXSize parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXSize").

The button size specified by the button
XXSize parameter corresponds to the width (in the case of horizontal button bars) or height (in the case of vertical button bars) of the button being defined. For instance, suppose that there are three buttons on a horizontal button bar. Each button is 20 pixels wide and the buttons are arranged edge-to-edge. The value for the button1Size, button2Size, and button3Size parameters would all be "20".

Remember that the button
XXSize parameter tells the applet how many pixels the button extends from the value of the buttonXXStart parameter.
buttonXXURL

Whenever a button on the button bar is clicked, one or more URLs specified as the value of the buttonXXURL parameter are loaded (see also the buttonXXTarget parameter).

A single URL or multiple URLs are assigned to a button by a parameter that is named by replacing the "XX" portion of the button
XXURL parameter name with the button number. For instance, the URL value for button 1 will have a parameter name of "button1URL", the URL value for button 2 will have a parameter name of "button2URL", etc.

To assign a single URL to a button, simply specify the URL as the parameter value. For instance, to assign the URL for the Modern Minds site to button 1 on a button bar, the parameter would be:

<PARAM NAME="button1URL" VALUE="http://www.modernminds.com">

To assign multiple URLs to a button, separate each URL with at least one space character. Note that you will need to use multiple targets if you assign multiple URLs to a button (see the buttonXXTarget parameter). An example of a button that has multiple URLs assigned to it is:

<PARAM NAME="button1URL" VALUE="http://www.modernminds.com  SiteList.html  http://www.gamelan.com">

The value of the button
XXURL parameter can be any valid URL. This means that the URL can be a complete URL as for instance,

<PARAM NAME="button1URL" VALUE="http://www.modernminds.com">

or the URL can be a relative URL like:

<PARAM NAME="button1URL" VALUE="Home.html">

If a relative URL is used, then the URL is relative to the directory that contains the HTML page in which the applet is embedded.

Note that you can also use the "mailto" option to launch a user's mail client. For example:

<PARAM NAME="button1URL" VALUE="mailto:comments@modernminds.com">

(Make sure that you do not use the buttonXXTarget parameter if you are using "mailto".)

If a button position has been defined using a buttonXXStart and a buttonXXSize parameter, but no button
XXURL parameter is defined, or if a badly formed URL is entered as the value of the buttonXXURL parameter, then the button will be disabled (for information about disabled buttons, see the buttonsDisabled, buttonsDisabledDim, and disableBadURL parameters).

Note that the XX portion of the button
XXURL parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXURL".
buttonXXTarget

The buttonXXTarget parameter defines the frame (or frames) that the URL (or URLs) specified by the buttonXXURL parameter will be loaded into when the button is clicked.

The value of the button
XXTarget parameter can be any valid target frame name or symbol (some browsers will open a new browser window if the target name does not exist).

Some special symbolic values are (warning: these values might not work for every browser):

_blank
Always load this link into a new, unnamed window

_self
Always load this link over the current page

_parent
Always load this link over the parent page (becomes self if there was no parent)

_top
Always load this link at the top level (becomes self if current page is at the top)

If a single target is entered as the value of the buttonXXTarget parameter, then whenever a button on the button bar is clicked the URL specified as the value of the buttonXXURL parameter will be loaded in the frame specified by the buttonXXTarget parameter. If the buttonXXTarget parameter is not specified, then the URL is loaded into the current frame.

If multiple URLs are specified as the value of the buttonXXURL parameter, then multiple target frames should be specified for the value of the button
XXTarget parameter (if the buttonXXTarget parameter is omitted or only one target is specified, then all the URLs will load into a single target frame one after another).

To assign target frames for multiple URLs, separate each target name with at least one space character. For instance, if the "button1URL" is defined as:

<PARAM NAME="button1URL" VALUE="http://www.modernminds.com  SiteList.html  http://www.gamelan.com">

then the corresponding "button1Target" might be defined as:

<PARAM NAME="button1Target" VALUE="_blank  ContentFrame  JavaFrame">

To omit a target frame in a list (for instance, if you are using a "mailto:" as a URL), you can use a "-" (a dash) character at the appropriate position. For example:

<PARAM NAME="button1URL" VALUE="mailto:info@modernminds.com  SiteList.html  http://www.gamelan.com">

<PARAM NAME="button1Target" VALUE="-  Frame1  Frame2">

A target frame is assigned to a button's URL by a parameter whose name is formed by replacing the "XX" portion of the button
XXTarget parameter name with the button number. For instance, the target frame for the button 1 URL will have a parameter name of "button1Target", the target frame for the button 2 URL will have a parameter name of "button2Target", etc.

Note that the XX portion of the button
XXTarget parameter is always replaced with a number -- you should never have a parameter literally called "buttonXXTarget"
buttonXXDesc

Whenever the mouse is moved within a button's boundaries, a line of text can be displayed on the browser's status line to give the user a description of the button's purpose or function. The text is cleared from the status line when the mouse is moved outside of the button's boundaries.

A line of text is assigned to a button by a parameter whose name is formed by replacing the "XX" portion of the buttonXXDesc parameter name with the button number. For instance, the descriptive text for button 1 will have a parameter name of "button1Desc", the descriptive text for button 2 will have a parameter name of "button2Desc", etc.

If this parameter is not specified for a button, then no text will be displayed on the status line when the mouse is moved within the button's boundaries.
Copyright © 1997 by Modern Minds, Inc.