
January 14th, 2013, 08:35 AM
|
 |
Contributing User
|
|
Join Date: Apr 2007
Location: Galway
Posts: 1,369

Time spent in forums: 1 Month 4 h 23 sec
Reputation Power: 8
|
|
This can be achieved my monitoring the focus/blur events. The code below is condensed but an be broken out into a function if you wanted to do something more advanced.
Code:
<textarea id='txtArea' onFocus="if(this.value == 'Enter Text') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Enter Text';}" >Enter Text</textarea>
__________________
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.
|