Reply to Re: A little java help??

Your name:

Reply:


Posted by nice.guy.nige on 12/16/06 15:46

While the city slept, Olli Mδntyranta (ollimax@gmail.com) feverishly
typed...

> sally jo wrote:
>> 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. Say for example I put some text in there, carry on with
the form, then notice I've made a typo in that field. I click on it to
change it and voila! Everything I typed before has vanished!

Maybe something like;

<script type="text/javascript">
<!-- Hide

var firstTime = true;
function clearText()
{
if(firstTime) {
document.theBigForm.theField.value = "";
firstTime = false;
}
}

// Dunhindin -->
</script>

I've not put that to the test mind, and it is a while since I did any JS...

Cheers,
Nige

--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация