OZONE Asylum
FAQ
How do I use an image input as a reset button for a form?
This page's ID:
5345
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "How do I use an image input as a reset button for a form?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Technically it isn't possible (as far as I'm aware and no one has corrected me yet) to have the attribute type="image" for reset input buttons. kuckus has suggested some answers: [quote]Two possibilities: 1. Using CSS on the standard Reset button, like <input value="" type="reset" style="background-image: url(http://www.OzoneAsylum.com/images/ASYLUM44b.jpg); border: 0; width: 300px; height: 90px; background-color: transparent;" /> This works as expected in IE, but doesn't in Mozilla. It just displays a blank gray button (which the correct width and height though). 2. Using JavaScript and the image's onclick event to reset the form: <img src="http://www.OzoneAsylum.com/images/ASYLUM44b.jpg" onclick="document.forms[0 is a broken link.].reset();" /> Works beautifully in both IE and Mozilla[/quote] ------------------------- Relevant threads: [url=http://www.ozoneasylum.com/Forum4/HTML/000200.html]Reset form button as ImageField???[/url] [url=http://www.ozoneasylum.com/Forum12/HTML/001262.html]Using an image as a form reset button[/url] ------------------------- Relevant links: The JavaScript solutions: [URL=http://developer.irt.org/script/1019.htm]How do I use my own graphic button to reset all the text fields in a form?[/URL] [URL=http://simplythebest.net/info/javascript10.html]graphic form buttons script[/URL] ___________________ [internallink=4626]Emperor[/internallink] [small][i](Added by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Fri 18-Oct-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Fri 31-Jan-2003)[/i][/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »