Hi,
I have created the following text input field:
<form name="xyz">
<input type="text" name="myText" size="30"
value="Initial text"
onclick="document.xyz.myText.value='';"/>
</form>
When the field is clicked the initial text is removed, clearing the way for new text to be entered, which is what I want. The trouble is if the field is again clicked the new text entered is also cleared which is not what I want. I only the field cleared for the first click and not for subsequent clicks. How can this be achieved? I will be grateful for all help.
I have created the following text input field:
<form name="xyz">
<input type="text" name="myText" size="30"
value="Initial text"
onclick="document.xyz.myText.value='';"/>
</form>
When the field is clicked the initial text is removed, clearing the way for new text to be entered, which is what I want. The trouble is if the field is again clicked the new text entered is also cleared which is not what I want. I only the field cleared for the first click and not for subsequent clicks. How can this be achieved? I will be grateful for all help.