Re: Using an image as a reset button on a PHP script

From: Date: Fri, 13 Jul 2001 21:51:29 +0000
Subject: Re: Using an image as a reset button on a PHP script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57818@lists.php.net to get a copy of this message
Aside from doing 2 tricky... well... tricks. You can't.. Standard HTML (to my knowledge) does not support the ability to have a reset button be set to an image. only those large gray Cadillac sized hideous buttons. Now, with that said.. there are 2 ways you can do it. ;-) Client Side - If you used a client side scripting language, like javascript, you could set the action of that image to (onMouseUp) clear the contents of the form.. I have seen this done pleanty of times before... Keep in mind that won't always work, but hey.. its just a reset button, right? Server Side - Its possible (php certainly included) that in the code the form submits to, it could check the value of that form image button, and if true, return you to the form and clear all the fields... I'm trying to think of anyone who does this, and am drawing a blank.. There isn't much reason not to though... In fact, i much like this way, and if no one has objections, i think i'll start doing it. ;-) -- Aaron Bennett ----- Original Message ----- From: "Brandon Orther" <orther@webintellects.com> To: "PHP User Group" <php-general@lists.php.net> Sent: Friday, July 13, 2001 2:46 PM Subject: [PHP] Using an image as a reset button on a PHP script > Hello, > > I am making a script at the moment and want to use images instead of the > usual buttons. Does anyone know how I can use the image as a reset > button? > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon@webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > >

« previous php.general (#57818) next »