$("form :input:not([EMAIL PROTECTED]):not(button)").val("")
I personally prefer reset() because there's rarely a case where you're
setting default values that you don't intend to be the default value ;)
-- Yehuda
On 12/28/06, Mike Alsup <[EMAIL PROTECTED]> wrote:
> That could also be written as: $("form :input").val("");
I wouldn't recommend that because :input will grab all inputs
*including* type==submit and type==button. Clearing those is probably
not what you'd want to do.
I think maybe the form plugin needs to provide clearForm and resetForm
methods and perhaps options to perform these functions automatically
upon successful submit.
Mike
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/