I've got a default value of some text in an input element when a page loads.
What I'd like to do is have the value disappear when the user clicks in the
input field.
I've figured out I can use:
onclick="this.value='';"
This works fine, however if for some reason the user adds his own input,
then click somewhere else/clicks back, the text has once again been erased.
So I thought of a function like the following, however it does not work:
function removeinput(x) {
if (x == 'Enter items not on standard list here...') {
x = '';
}
}
onclick="removeinput(this.value);"
I've also tried placing this.value inside of single quotes to no avail.
What am I doing wrong? Or do I just have the complete wrong approach here?
Thanks,
Max