Gossamer Forum
Home : General : Perl Programming :

3 Image Submit Buttons

Quote Reply
3 Image Submit Buttons
Hi,

I have a form that links back to a single cgi script. On one page I have 3 submit "images":

<input type="image" border="0" name="change" src="/images/CHANGE.gif" width="50" height="20">

<input type="image" border="0" name="preview" src="/images/PREVIEW.gif" width="50" height="20">

<input type="image" border="0" name="send" src="/images/SEND.gif" width="50" height="20">

My question is, how, in a cgi script, do you call on which submit button was pressed if they're all in the same form? If I was using normal form submit buttons I'd be able to say..

if ( $buttonname = 'change') do this...

but with the images it's got me stuck.

Anyone?

Cheers,
R.


Quote Reply
Re: 3 Image Submit Buttons In reply to
How are you parsing the input?

You really need 3 different form fields (I think), otherwise the content of all 3 of the submit buttons is sent in the query field.

Andy

webmaster@ace-installer.com
http://www.ace-installer.com