Here is my jsfiddle example, the textarea shows no value onload, but will onblur, does textarea not accept the value attribute?
+2
A:
Because you are using a textarea
, its value comes in between its tag name:
<textarea class="jsf" name="msg" onblur="if(this.value=='') this.value='Write here!';" onfocus="if(this.value=='Write here!') this.value='';">Write here!</textarea>
Sarfraz
2010-05-07 10:25:35
Thanks, but how do I add this to `{textarea onblur="if(this.value=='') this.value='Skriv her';" onfocus="if(this.value=='Skriv her') this.value='';"}`? there isn't an option to close the tags in this smarty system, I tried with `{/textarea}` but it broke it.
Kyle Sevenoaks
2010-05-07 11:24:29
@Kyle Sevenoaks: sorry but i have no idea about smarty because i have not used it yet :(
Sarfraz
2010-05-07 11:42:58
@Sarfraz: no worries, I'll figure it out :) Thanks for pointing me in the right direction.
Kyle Sevenoaks
2010-05-07 11:55:17