Javascript for changing the value of a non required field
<p>Basically, I have the labels of the fields inside the input boxes and use <em>onblur</em> and <em>onclick</em> to clear the values etc. I also have some javascript to make sure the required files aren't submitted as the label e.g. first name contains the label <code>First Name*</code> and I don't want it submitted as <code>First Name*</code>.</p>

<p>Where I'm struggling is with the comments box. It isn't a required field so I don't want an alert to pop up, I just want the javascript to change the value to either blank or n/a if it's left as 'comments'. Here is the javascript code I am using to try and achieve this:</p>

<pre><code>var comments=document.getElementById('comments').value;
if (comments=="comments")
{
    document.getElementById('comments').value="n/a";
}
</code></pre>
