<INPUT TYPE=image SRC="images/doit.gif" NAME='action' VALUE='Doit' ALIGN=middle>
CGI::Form, this is a call to the method
image_button, as shown in the following example:
$q->image_button( -src=>"images/doit.gif", -name=>'action', -value=>'Doit', -align=>'middle' );
-src is used to specify the URL to the image which is to be displayed;
-name specifies an arbitrary name associated with the image button;
-value specifies an arbitrary value. The
-value parameters are important to distinguish the action between multiple image buttons on a form.
-align is used to line up the image with the text that follows it. The possible values for
Listboxes are fields that contain a scrollable list of text strings for single or multiple selection. You can use listboxes for such things as specifying a state (single selection) or product of interest (multiple selection). Use the
OPTION tags, as shown in the following lines, to create a listbox:
<SELECT NAME='State' SIZE=3> <OPTION>CA <OPTION>WA <OPTION>OR <OPTION>NV <OPTION>AZ </SELECT>
CGI::Form, this calls the
@states=( `CA', `WA', `OR', `NV', `AZ' ); $q->scrolling_list( -name=>'State', -values=>\@states, -default=>'CA', -size=>3 );
The nice feature of using
CGI::Form is that the options can be stored within Perl arrays, which makes working with the data easier.