dead reset button

T

tomb

Hi, can someone make sense of this?

I am using AJAX to populate a <div>, which is working very nicely,
except for one thing:
My reset button in the resulting <form> is dead.

When I put a breakpoint and trap the response in the javascript code,
the returned html for the button looks like this:
<input type=\"reset\" value=\"Clear\" />

When I look at the response in Firebug console, there are no slashes, so
I don't know what's going on. It looks like this:

<input type="reset" value="Clear" />

The main thing is, it doesn't reset the form elements. Has anyone ever seen this behavior before?

Tom
 
T

tomb

Never mind, I just saw the issue - I'm setting the value for each text
box in my php code, so the reset button doesn't clear those.
 
S

Steve Robinson

tomb said:
Hi, can someone make sense of this?

I detest reset buttons. I have never found a need for one and usually end up
pressing them by mistake losing all the data that I've entered.

Steve.
 
A

Animesh K

Steve said:
I detest reset buttons. I have never found a need for one and usually end up
pressing them by mistake losing all the data that I've entered.

Steve.

You serious?
 
T

tomb

Steve said:
Yes. A quick Google shows that Jacob Nielsen agrees with me
http://www.useit.com/alertbox/20000416.html

Steve.

This is a very good point. Thanks for raising it. I am developing a
web application, so I actually do need a button that completely clears
the form, but I'm going to change the value of it to be New, rather than
Clear. That is actually the purpose of the button, to enter a
completely new record.

Tom
 
S

Steve Robinson

tomb said:
This is a very good point. Thanks for raising it. I am developing a web
application, so I actually do need a button that completely clears the
form, but I'm going to change the value of it to be New, rather than
Clear. That is actually the purpose of the button, to enter a completely
new record.

Just remember though that labeling it is not enough. You need to make sure
that it is positioned well away from and is distinct from the submit button
so that it can't be pressed accidentally when the user means to submit the
form contents.

Steve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top