Form Field: How do I change the background on blur?
- by Liso22
I managed to remove the background when the user clicks on the field but I cannot restore it when it blurs!
This is the field:
<textarea class="question-box" style="width: 240px; background:
white url('http://chusmix.com/Imagenes/contawidget.png') no-repeat
50% 50%; color: grey;" cols="12" rows="5" id="question-box-' .
$questionformid . '" name="title" onblur="if(this.value == '') {
this.style.color='#848484'; this.value=''this.style.background='
white url('http://chusmix.com/Imagenes/contawidget.png') no-repeat 50% 50%;e';}"
onfocus="if (this.value == '') {this.style.color='#444';
this.style.background='none';}" type="text" maxlength="200" size="28"></textarea>
Anyone knows what I'm doing wrong?? Thanks