[WEB4LIB] HTML question: Using images as buttons on forms
Araby Greene
araby at unr.edu
Tue Dec 19 10:42:43 EST 2000
Since the default behavior for image type input is to "submit" you have to
use JavaScript to call a function that resets the form "onClick."
This article has a script that accounts for several anomalies:
http://tech.irt.org/articles/js185/
A simpler example is at: http://www.easyjavascript.com/submitreset.htm
Hope this helps,
Araby Greene
____________________________________________
Araby Greene
Web Development Librarian
Getchell Library | http://www.library.unr.edu/
784-6500 ext. 343 | araby at unr.edu
----- Original Message -----
From: "Bert Coenen" <Bert.Coenen at law.kuleuven.ac.be>
To: "Multiple recipients of list" <web4lib at webjunction.org>
Sent: Tuesday, December 19, 2000 4:35 AM
Subject: [WEB4LIB] HTML question: Using images as buttons on forms
> Dear all,
>
> I inherited a small database with a web interface (MySQL and PHP) from a
> colleague. I'm working on the lay-out of the search form and would like to
use
> images in stead of plain buttons. For the submit button it's easy, you
just
> replace it with an image, but what about the reset button? If I simply
replace
> it with an image, it acts as a second submit button, does anyone know how
to
> get an image to reset a form?
>
> example: http://www.law.kuleuven.ac.be/lib/videotheek/videotheek.htm
(with
> two plain buttons)
More information about the Web4lib
mailing list