473,399 Members | 4,192 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,399 software developers and data experts.

textarea validation

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 validate
that only 23 lines of 40 characters are being entered.
Jul 23 '05 #1
1 1792
Neil Shaw wrote:
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 validate
that only 23 lines of 40 characters are being entered.


23*40 = 920. Check it's length property.

You could conceivably count the returns, but they are different on
different OS'es. But what happens if I don't hit the Enter key but keep
on typing? Is that one line or multiples?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
8
by: yerk5 | last post by:
Does js have some way of doing what I want here: I want to paste a multiline block of text into a TEXTAREA form field, and there is data in the block of text that I want to extract into a...
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...
2
pradeepjain
by: pradeepjain | last post by:
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 .
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.