how do I clear my text fields after sending a message
<p>I'm trying to use an ajax contact form to send me emails but i'd like to clear the text fields after the successful sending of the email. I've tried setting the value to val("") but it didnt seem to work. How can I get this to work?</p>

<pre><code>$(document).ready(function(){
$("#ajax-contact-form").submit(function(){

// 'this' refers to the current submitted form
var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "inc/contact.php",
   data: str,
   success: function(msg){

$("#note").ajaxComplete(function(event, request, settings){

if(msg == 'OK') // Message Sent? Show the 'Thank You' message 
{
result = '&lt;div class="notification_ok"&gt;Your message has been sent. Thank you!&lt;/div&gt;';
$("#fields").val("");
}
else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});

});
</code></pre>

<p>&lt;-------------------------HTML--------------------------></p>

<pre><code>&lt;center&gt;

&lt;center&gt;&lt;h3&gt;A Tableless Contact Form (JQuery &amp; AJAX)&lt;/h3&gt;&lt;/center&gt;

&lt;div align="left" style="width: 500px;"&gt;

&lt;fieldset class="info_fieldset"&gt;&lt;legend&gt;Contact&lt;/legend&gt;

&lt;div id="note"&gt;&lt;/div&gt;
&lt;div id="fields"&gt;

&lt;form id="ajax-contact-form" action="javascript:alert('success!');"&gt;

&lt;INPUT class="textbox" type="text" name="name" value=""&gt;&lt;br /&gt;

&lt;INPUT class="textbox" type="text" name="email" value=""&gt;&lt;br /&gt;

&lt;INPUT class="textbox" type="text" name="subject" value=""&gt;&lt;br /&gt;

&lt;TEXTAREA class="textbox" NAME="message" ROWS="5" COLS="25"&gt;&lt;/TEXTAREA&gt;&lt;br /&gt;

&lt;INPUT class="button" type="submit" name="submit"  value="Send Message"&gt;
&lt;/form&gt;

&lt;/div&gt;

&lt;/fieldset&gt;

&lt;/div&gt;

 &lt;/center&gt;
</code></pre>
