473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

textarea validation

pradeepjain
563 512MB
Hii,
I want to check for empty textarea with javascript ..say only blank space must also be treated as empty textarea...how to do it..is there any script for this .
Nov 28 '08 #1
2 1622
Dormilich
8,658 Expert Mod 8TB
test either its innerHTML property, or its nodeValue
Nov 28 '08 #2
acoder
16,027 Expert Mod 8TB
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

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

Similar topics

3
by: Sunil Kulkarni | last post by:
I need to validate my TextArea as follows: 1) IT SHOULD ALLOW FOR ONLY 5 COLUMNS 2) IT SHOULD ALLOW ONLY 65 CHARACTERS PER ROW I need some kind of a JS validation for the same. I have tried...
1
by: Neil Shaw | last post by:
Hi can someone please helpme. I want to validate a textarea box. I dont want to just validate the no of characters entered i need to check how many lines have been entered. Basically i want to...
4
by: Jos van Uden | last post by:
Hello, Recently I created a validation script for a form that checks a textarea. The visitor is invited to send a list of 25 words, with each word on a new line. Before I submit the list I...
7
by: daniel kaplan | last post by:
hello all, am new to HTML and am in the process of creating a form, no serious headaches, but am stumped on two types of fields. i can take care of these situations using javascript, but was...
0
by: ahres | last post by:
I'm using Stephen Poley's javascript form validation for a relatively simple form, but have encountered a tricky situation wherein the textarea field is frozen in IE5. When clicking in the textarea...
10
by: M K | last post by:
Is there a way to limit an asp:textarea to 100 chars on the client side? The db only accepts 100 and chops the rest off.
5
by: Openside | last post by:
Hi, I am fairly green when it comes to JavaScript. I have the Form Validation below for 3 textarea fields. It works fine, but if none of the fields are filled out then 3 consequtive alert...
9
by: Andrew Poulos | last post by:
I'm dynamically populating a TEXTAREA with some info that includes a URL. Eg. frm.value = "This is the link to use <url: http://www.foo.com >"; but this results in a page that doesn't...
1
by: tokcy | last post by:
Hi everyone, this is my first time when i am using FCKeditor and i have some problem while doing validation on textareas. I am checking if that textarea is blank then alert should come for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.