RE: [PHP-WIN] Problem with 2 buttons
| From: | HKG) | Date: | Wed, 24 Sep 2003 12:13:01 +0000 |
| Subject: | RE: [PHP-WIN] Problem with 2 buttons | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21535@lists.php.net to get a copy of this message | ||
According to the HTML standard (Ref 1) "submit button" with images might
typically be done like this:
<FORM action="http://somesite.com/prog/adduser"
method="post">
<BUTTON name="submit" value="submit" type="submit">
Send<IMG src="/icons/wow.gif" alt="wow">
</BUTTON>
<BUTTON name="reset" type="reset">
Reset<IMG src="/icons/oops.gif" alt="oops">
</BUTTON>
</P>
</FORM>
Ref 1:
http://www.w3.org/TR/html4/interact/forms.html#h-17.5
On Tue, 2003-09-23 at 17:40, William Cheung wrote:
> If I use submit type, I don't need the 2 hidden lines. But as my boss wants
> clickable images, the two lines somehow do the trick. If I took the 2 lines
> away, the 2 images will not do anything if I click them. These codes are
> done by a previous programmer and I don't know how she got that trick.
>
> William Cheung B.Sc, MCSE, MCDBA
>
> Databyte Corp.
>
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@lumc.nl]
> Sent: September 23, 2003 4:15 AM
> To: william@databyte.com
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Problem with 2 buttons
>
> What is the purpose of the HIDDEN elements?
>
> On Mon, 2003-09-22 at 19:43, William Cheung wrote:
> > I have 2 buttons sitting next to each other. One to update; the other
> > to cancel. However, no matter which button I click, the
> > isset($_POST["CHANGE"]) always returns true. My template code is list
> > below. Could someone tell me what's wrong with my code?
> >
> >
> >
> > <tr height=60>
> >
> > <td width="5%"> </td>
> >
> > <td valign=bottom>
> >
> > <input type="hidden" name="CHANGE">
> >
> > <input type=image name=CHANGE
> > src={#img_dir#}{#template#}page6grid_g3.gif
> > onmouseover="this.src='{#img_dir#}{#template#}page6grid_g4.gif'"
> > onmouseout="this.src='{#img_dir#}{#template#}page6grid_g3.gif'">
> >
> > <font class=mpanel_mid_data style="font-weight:
> > lighter;">Update order</font>
> >
> > </td>
> >
> > <td valign=bottom>
> >
> > <input type="hidden" name="CANCEL">
> >
> > <input type=image name="CANCEL"
> > src={#img_dir#}{#template#}page6grid_g11.gif
> > onmouseover="this.src='{#img_dir#}{#template#}page6grid_g12.gif'"
> > onmouseout="this.src='{#img_dir#}{#template#}page6grid_g11.gif'">
> >
> > <font class=mpanel_mid_data style="font-weight:
> > lighter; text-indent: 0px;">Cancel order</font>
> >
> > </td>
> >
> > </tr>
> >
> >
> >
> > William Cheung B.Sc, MCSE, MCDBA
> >
> > Databyte Corp.
> >
> >
> >
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php