Text labels in textbox being passed onsubmit
<p>I found this useful little method of displaying field titles within the text fields themselves.</p>

<p><a href="http://viralpatel.net/blogs/2009/09/default-text-label-textbox-javascript-jquery.html" rel="nofollow">http://viralpatel.net/blogs/2009/09/default-text-label-textbox-javascript-jquery.html</a> </p>

<p>Only problem is that if the fields aren't completed by the user then the title values get submitted.</p>

<p>Could anyone tell me how to add a onsubmit check to make sure we don't submit default text?</p>

<p>This is the javascript:</p>

<pre><code>$('input[type="text"]').each(function () {

    this.value = $(this).attr('title');
    $(this).addClass('text-label');

    $(this).focus(function () {
        if (this.value == $(this).attr('title')) {
            this.value = '';
            $(this).removeClass('text-label');
        }
    });

    $(this).blur(function () {
        if (this.value == '') {
            this.value = $(this).attr('title');
            $(this).addClass('text-label');
        }
    });
});
</code></pre>

<p>Many thanks...</p>
