CREATING A CLICKABLE IMAGE BUTTON

     print $query->image_button(-name=>'button_name',
				-src=>'/source/URL',
				-align=>'MIDDLE');      

	-or-

     print $query->image_button('button_name','/source/URL','MIDDLE');

image_button produces a clickable image. When it's clicked on the position of the click is returned to your script as ``button_name.x'' and ``button_name.y'', where ``button_name'' is the name you've assigned to it.

JAVASCRIPTING: image_button recognizes the -onClick parameter. See checkbox_group for further details.

Parameters:
  • The first argument (-name) is required and specifies the name of this field.

  • The second argument (-src) is also required and specifies the URL

  • The third option (-align, optional) is an alignment type, and may be TOP, BOTTOM or MIDDLE
  • Fetch the value of the button this way: $x = $query->param('button_name.x'); $y = $query->param('button_name.y');