How to change the value of textbox when form is submitted?
<p>I have a form which has fields pre-filled with a default value, like this:</p>

<pre><code>&lt;input type=text name=first value="First Name" class="unfilled" /&gt;
</code></pre>

<p>When the textbox is clicked, the class <code>unfilled</code> is removed from the textbox, and the textbox is made blank so the user can type in his/her own info.</p>

<p>The problem is that when the form is submitted, its getting submitted with these default values, which is messing up the server side validation.  How can I do it so that when the form is submitted, all the fields which have a default value are made blank, so the server side validation would throw the error: 'Please fill in this field'?</p>

<p>I'm trying the following code which isn't working:</p>

<pre><code>$("#myForm").submit(function()
        {
            $(".unfilled").val('');
        }
);
</code></pre>

<p>This does make the fields blank, but the server still receives them with their previous default values.</p>
