hi,
i have a textarea and i want the user to enter some text if he doesnt enter any text i want to fire an alert
the condition i am checking is in textarea if u press the spacebar it adds spaces i dont want them to add spaces and submit the form
here is my code
but the alert is never fired am i using the trim function properly
any ideas
thanks,
todd
i have a textarea and i want the user to enter some text if he doesnt enter any text i want to fire an alert
the condition i am checking is in textarea if u press the spacebar it adds spaces i dont want them to add spaces and submit the form
here is my code
Code:
var checkbody=Trim(document.frm1.txtbody.value);
if(checkbody.length < 0)
{
alert("enter some text");
return false;
}
but the alert is never fired am i using the trim function properly
any ideas
thanks,
todd

