By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,685 Members | 1,681 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,685 IT Pros & Developers. It's quick & easy.

textarea validation

P: 563
I want to check for empty textarea with javascript ..say only blank space must also be treated as empty to do there any script for this .
Nov 28 '08 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 8,639
test either its innerHTML property, or its nodeValue
Nov 28 '08 #2

Expert Mod 15k+
P: 16,027
innerHTML will be unreliable. The Textarea object has a value property which you should test. To regard blank spaces as no input, make a trim() function that removes spaces (or you can add it to the String object).
Nov 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.