S
sally jo
What is the code that you use to put words int he input box that
disappear when the user starts typing??
disappear when the user starts typing??
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"sally jo said:What is the code that you use to put words int he input box that
disappear when the user starts typing??
Or this:sally said:What is the code that you use to put words int he input box that
disappear when the user starts typing??
[...][...]sally said:What is the code that you use to put words int he input box that
disappear when the user starts typing??
function ClearText(){
document.theBigForm.theField.value = "";
}
While the city slept, Olli Mäntyranta ([email protected]) feverishly
typed...
[...][...]sally said:What is the code that you use to put words int he input box that
disappear when the user starts typing??
function ClearText(){
document.theBigForm.theField.value = "";
}
The only problem with this code is that it will clear the textbox
everytime it is clicked on.
if(firstTime) {
document.theBigForm.theField.value = "";
firstTime = false;
}
It does not help against the problem that the user starts typing and
then the JavaScript code starts executing and kills his input. Of
course, if the author is slow in typing, he never realizes this.
Eh? How is this going to kill the user's input?
The script is fired
when the field acquires focus, not at any other time.
Scripsit nice.guy.nige:
Among other things, the way you explained in your earlier message.
Explain
And you have no way of really knowing when that happens. There's no
law against browsers focusing automatically on the first input field,
or on the first focusable element.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.