input onfocus problem
- by Syom
it is the problem, i can't undertand anyway.
i have the following simple script
<input class="input" type="text" name="l_username" style="color: #ccc;"
value= " <?if ($_POST[l_username] != '')
echo $_POST[l_username];
else echo 'something';?>"
onfocus="if (this.value == 'something') {
this.value='';this.style.color='black';}" />
onfocus doesn't work here, but when i delete php script from value, it works
<input class="input" type="text" name="l_username" style="color: #ccc;"
value= " something"
onfocus="if (this.value == 'something') {
this.value='';this.style.color='black';}" />
it works fine.
could you tell me why?
thanks