Moxi Media Inc.
<button> Discussion Forum

IMF Developer's Guide » Site Configuration » <button>  

The <button> element defines a button in the toolbar above the map. A button causes something to happen when the icon is pressed, as opposed to a a tool which sets a mode that causes something to happen when the user clicks on the map. Tools, buttons and spaces are displayed in the order that they appear within the <tools> element.

See also: tool examples and tool image gallery.

Frequency Parent Elements (the <button> element is valid within):
PO+ <tools>
   

Frequency Description (in this context)
PO+ The <button> element may appear zero or more times within the <tools> element.
   

Attributes Description
height The height of the button image, in pixels. Required.
help The URL to a text file (some HTML permitted) that contains help for this button to be included on the auto-generated help page. The URL can contain the special variable $IMF to specify that the document is relative to the IMF installation directory. Absolute URLs may also be used. URLs that don't start with http: or $IMF are resolved relative to the location of the XML file. Optional. Help text is generated from other attributes if this attribute is missing.
hint The pop-up tip that will appear when the user moves the mouse over the button. Required.
graphic The URL of the image for the button. The URL can contain the special variable $IMF to specify that the document is relative to the IMF installation directory. Absolute URLs may also be used. URLs that don't start with http: or $IMF are resolved relative to the location of the XML file. Required.
name The name of the button. All buttons in a toolset must have a unique name. Required.
status The message that will appear in the browser's status area when the user moves the mouse over the button. Required.
target The name of the frame that the URL will be executed in. Use "_blank" to execute it in a new browser window. Required.
url The URL that will be executed when the button is clicked. Required.
width The width of the button image, in pixels. Required.
   

Example:

<!-- A button that calls javascript -->
<button name="Full Extent"
        url="JavaScript:fullExtent();"
        target="mapFrame"
        hint="Full Extent"
        status="Zoom to the designed full extent of this map."
        help="$IMF/help/fullExtentButton.txt"
        graphic="$IMF/tools/zoomfull.gif"
        width="16" height="16"/>

<!-- A button that calls a script -->
<button name="Overview Map"
        url="$IMF/imfIndexMapCrosshair.jsp"
        target="dataFrame"
        hint="Overview Map"
        status="Displays an overview map showing the location of the map in the main window."
        help="$IMF/help/indexMapButton.txt"
        graphic="$IMF/tools/toggleov.gif"
        width="16" height="16"/>

Valid HTML 4.01!