PDA

View Full Version : Button doing the wrong thing.


jessegut
02-20-2004, 01:46 PM
For some strange reason my "reset" button is submitting rather than just reseting a form.

I am using images for my "submit" and "reset" buttons with the following code. The "submit" button works fine.

MY CODE FOR SUBMIT BUTTON
<input type="image" img src="images/submit.gif" width=60 height= 24 name="submit">

MY CODE FOR RESET BUTTON
<input type="image" img src="images/reset.gif" width=60 height= 24 name="reset">

Can any one suggest a solution to my reset button problem?

Happy Trails

barkingpenguin
02-21-2004, 07:08 AM
The input type for a Submit button should be:
<INPUT TYPE="submit" VALUE="Submit">

The input type for a Reset button should be:
<input type="reset" value="Clear Form">

HTH!

jessegut
02-21-2004, 07:19 AM
barkingpengiun -

I have decided to forgo the "reset" button all together, as I have determine that it really didn't add value to my form, which is relatively short, and because some folks may accidently hit the "reset" button rather than the "submit" button (since they are traditionally place close together).

Thanks for your suggesstion. I sincerely appreciate that you took the time to share your expertise. I hope I can help you in the future.


Thanks, again.

jessegut

three
03-18-2004, 09:01 AM
jessegut,
I have the same problem.

barkingpenguin,
I think that jessegut wanted to use his own generated buttons.jif for both submit and reset. Making the submit button work is no problem using <input type="image" src="..."...>
however using the same image input tag with a different value
or name or any thing I tryed won't reset the form.
I used the <button type="reset"><image src="...."></button>
and it worked but I had a normal button color underneath, that I could not blend in with my background color, with a jif. reset button image over the top. I too would like to use an image
for my reset buttons. I am new to this HTML thing too but I have
studied a lot of different tutorials out there and I think that somewhere I read that reset buttons cannot be made with the <input type="image"> tag. Would someone let me know if that is not the case?