Basically, I have field labels inside input fields and use onblur and onclick to clear the values, etc. I also have javascript to make sure the required files are not presented as tags, for example. the first name contains the First Name* label, and I do not want it to be represented as First Name* .
Where I'm afraid, this is a comment box. This is not a required field, so I do not want the message to pop up, I just want javascript to change the value to empty or n / a if it remains as "comments". Here is the javascript code that I use to try to achieve this:
var comments=document.getElementById('comments').value; if (comments=="comments") { document.getElementById('comments').value="n/a"; }
source share