I'm validating a textarea for null value by following code
var message = document.chat_frm.msg.value;
if(message=="" || message==null){
alert("Say something or shout it out! Uhm ... no, type it in!");
//document.chat_frm.msg.focus();
return false;
}
It is working fine as if without entering any text I click on submit it returns alert message but when I enter a space in textarea and then click on submit it dnt give alert message simply submits the form
Can anyone help me