...

View Full Version : problem in using text area



san_crazy
06-02-2009, 06:57 AM
hi friends,
I got some annoying issues with textarea element.
I can't validate that <textarea> is empty inside if statement.
this is the HTML code


<textarea rows="6" cols="80" name="message" style="margin-top:20px;border:solid 1px #B7F0FF;" wrap="virtual">
</textarea>


I didn't enter any text inside this textarea element but when I apply the condition
if(message.value="") return true;

the condition becomes false that should have been true;
one more thing, when I checked this property message.value.length, it gives the value 11 not 0 while the textarea is empty.

how can I make this problem solved?

abduraooft
06-02-2009, 09:41 AM
Remove the line break and make it like

<textarea rows="6" cols="80" name="message" style="margin-top:20px;border:solid 1px #B7F0FF;" wrap="virtual"></textarea>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum