Re: An image in place of submit button?

lilley ([email protected])
Fri, 15 Sep 1995 11:59:26 +0100 (BST)


Lambert says:

> Mark Davies said

> >I know it's possible to use an image in place of a text "submit" button in
> >a form.
> >Could someone be so kind as to post me the html for this or point me to a site?
> >Thanks a lot.

> I think that this feature is only available in the HTML 3.0 standard.

but then adds

> I don't think any browsers currently support this
> feature yet. When HTML 2 becomes standard, it will.

This is actually part of the HTML 2.0 standard, and works now in some browsers.

Try this (working) example:

<FORM METHOD="POST" ACTION="http://info.mcc.ac.uk/cgi-bin/post-query">
<INPUT NAME="YourName"><BR>
<INPUT TYPE="image" SRC="http://info.mcc.ac.uk/hpctec/region.gif">
</FORM>

Query Results

You submitted the following name/value pairs:

YourName = hello
x = 160
y = 96

So it is not actually a submit button but it acts as one, in that the
form is submitted when you select it.

-- 
Chris Lilley, Technical Author
+-------------------------------------------------------------------+
|       Manchester and North HPC Training & Education Centre        |
+-------------------------------------------------------------------+
| Computer Graphics Unit,             Email: [email protected] |
| Manchester Computing Centre,        Voice: +44 161 275 6045       |
| Oxford Road, Manchester, UK.          Fax: +44 161 275 6040       |
| M13 9PL                            BioMOO: ChrisL                 |
|     URI: http://info.mcc.ac.uk/CGU/staff/lilley/lilley.html       | 
+-------------------------------------------------------------------+