Hello,
On a html form I have a text area where user can post comment.
There is an initial value with indications for the user to read, but when he clicks on the field the comment dissapears letting him write his own comment.
This field is enabled to receive a null value, and that is what I want to happen when the user doesn't write on it. But right now if the user don't write on it, it is storing the initial value ¨type here your comment¨ here is the code:[php] <textarea name="coment" id="coment" cols="32" rows="5" value="Search" onfocus="if
(this.value==th is.defaultValue ) this.value='';" >type here your comment
</textarea>[/php]
I have the idea on how to do it, but don't know how to code it correctly
here is my idea:
[php]<?php
if (['coment']=¨Ingresa aquí cualquier detalle
importante para el piloto, como que tipo de equipaje llevas.¨ {['coment]='null'}
?>[/php]Thanks for any help,
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that.
MODERATOR
On a html form I have a text area where user can post comment.
There is an initial value with indications for the user to read, but when he clicks on the field the comment dissapears letting him write his own comment.
This field is enabled to receive a null value, and that is what I want to happen when the user doesn't write on it. But right now if the user don't write on it, it is storing the initial value ¨type here your comment¨ here is the code:[php] <textarea name="coment" id="coment" cols="32" rows="5" value="Search" onfocus="if
(this.value==th is.defaultValue ) this.value='';" >type here your comment
</textarea>[/php]
I have the idea on how to do it, but don't know how to code it correctly
here is my idea:
[php]<?php
if (['coment']=¨Ingresa aquí cualquier detalle
importante para el piloto, como que tipo de equipaje llevas.¨ {['coment]='null'}
?>[/php]Thanks for any help,
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that.
MODERATOR
Comment