Topic: Reset form button as ImageField??? Pages that link to <a href="https://ozoneasylum.com/backlink?for=9543" title="Pages that link to Topic: Reset form button as ImageField???" rel="nofollow" >Topic: Reset form button as ImageField???\

 
Author Thread
Ducati
Paranoid (IV) Inmate

From: in your head
Insane since: Feb 2001

IP logged posted posted 10-15-2002 21:59 Edit Quote

Need some help here... I am trying to use ImageFields for form buttons. I have Submit figured out but for some reason, reset button won't work.. It acts as Submit!! aagghhh

this is what I have

<INPUT NAME="imageField2" TYPE="image" SRC="webhosting/reset.gif" WIDTH="100" HEIGHT="20" BORDER="0">

whats wrong with this? how can I make it so it resets form??

MAX

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

IP logged posted posted 10-15-2002 22:25 Edit Quote

Ducati: Thats because a reset has to have a type="reset" I'm not sure how to do it with an image - give me a mo as I'm looking at a similar problem.

[edit: Try a JavaScript solution:
http://simplythebest.net/info/javascript10.html

not ideal but I believe the type="image" acts as a submit by default]

___________________
Emps

FAQs: Emperor

Ducati
Paranoid (IV) Inmate

From: in your head
Insane since: Feb 2001

IP logged posted posted 10-16-2002 12:16 Edit Quote

Thanks! I looked at it.. have to read it a little more.. it looks like a solution =)

MAX

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

IP logged posted posted 10-18-2002 13:56 Edit Quote

OK added to FAQ with another resource:

How do I use an image input as a reset button for a form?

___________________
Emps

FAQs: Emperor

fidster
Obsessive-Compulsive (I) Inmate

From: Australia
Insane since: Apr 2003

IP logged posted posted 04-03-2003 07:23 Edit Quote

hi there, the javascript solution does actually reset the fields as intended (which is great), but it is also processing the actual form and going straight through to the confirmation page (sending through a blank email response to the form recipient). Any suggestions how I can stop the form from being processed and just get it to clear the fields only?

many thanks!!!

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

IP logged posted posted 04-04-2003 17:20 Edit Quote

That's a bit wierd. Can you show your code?

Is onClick a real event handler for images? I think it works but may not be technically correct.



.:[ Never resist a perfect moment ]:.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu