[jQuery] "Erasing" contents of a form

[jQuery] "Erasing" contents of a form

<html>
<body>
Hi folks,
I use the function below to send user comments to a database and get
refreshed on the current page - no problems.
However, I cannot seem to "erase" the contents of the comments
form (id=NewCommentZ) for subsequent use - the text area and text input
elements remain populated with the previously entered content.
The disabled lines in the code below are my guesses - no more - of how to
erase the form's contents, but I wasn't lucky.
I'd appreciate someone providing me with some direction/hint towards a
solution.
Thanks,
Bruce
<tt>$.fn.ajaxSubmit = function(e) {this.submit(function(){ var params =
{}; $(this) .find("input[@checked], input[@type='text'],
input[@type='hidden'], input[@type='password'], option[@selected],
textarea") .filter(":enabled") .each(function() { params[
this.name || this.id || this.parentNode.name || this.parentNode.id ] =
this.value; });
toggleContent('NewCommentZ');$.post(this.getAttribute("action"),
params, function(text){
       
$("div#comments2").html(text).fadeIn("slow");
       
$('#hilightcomment').highlightFade({color:'yellow',speed:2000,iterator:'linear'})
       
//$("NewCommentZ").html("");
       
//$(this).find("input[@checked], input[@type='text'],
input[@type='hidden'], input[@type='password'], option[@selected],
textarea").html("");
        }); return false; });}
</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/