Re: Image submit button not working.
| From: | Matt McClanahan | Date: | Tue, 18 Jul 2000 17:25:09 +0000 |
| Subject: | Re: Image submit button not working. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7105@lists.php.net to get a copy of this message | ||
On Tue, 18 Jul 2000, Paulson, Joseph V. "Jay" wrote:
> Hello everyone--
>
> Here's a problem that I can't figure out. I have a form and I have an image
> as my submit button however as you can see from the line below I set the var
> to be checkOut with a value "Add To Cart" but when I press the button the
> value isn't passed to the next page. My question is: How can you have a
> submit button that is an image so that the values get passed?
>
> "<input type=\"image\" name=\"checkOut\" value=\"Add To
> Cart\"
> src=\"images/addtocart.gif\">
Set checkOut with a hidden variable.
<input type="hidden" name="checkOut" value="Add To Cart">
Image submit buttons have always annoyed me. As far as I can tell you
can't set name/values, and can only use one per form, unless you start
employing JavaScript tricks. But relying on JavaScript is a Bad Idea,
imho, so.
Matt