473,327 Members | 2,025 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,327 software developers and data experts.

TEXT AREA ROWS IN HTML

SSG
I have text area having 4 rows & 10 cols.. while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...

Hw to create text area like that....

Jan 21 '07 #1
5 7034
Scripsit SSG:
I have text area having 4 rows & 10 cols..
That's ridiculously small for almost all practical purposes. It's
conventionally used in "feedback forms" to indicate how little you care
about user input.
while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...
You're wrong. By definition, as explicitly mentioned in HTML specifications,
textareas should accept an unlimited amount of lines of unlimited length.
Hw to create text area like that....
You can't. You need to check the amount of input in the server-side form
handler. You might wish to warn users about this. For more info, see
http://www.cs.tut.fi/~jkorpela/forms/textarea.html

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jan 21 '07 #2
SSG wrote:
I have text area having 4 rows & 10 cols.. while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...

Hw to create text area like that....
SSG,

You could replace the textarea with <input type="text" size="40"
maxlength="40">. That will limit the input to 40 characters AND will
give the user a correct visual clue regarding how much input will be
accepted.

As Jukka points out, 40 characters isn't much, so make sure your
expected data will actually be that small. One of my pet peeves (and, I
suspect, that of many others) is an input area that is too short for the
requisite data.

Chris Beall
Jan 21 '07 #3
Chris Beall <Ch*********@prodigy.netwrites:
SSG wrote:
>I have text area having 4 rows & 10 cols.. while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...

Hw to create text area like that....

You could replace the textarea with <input type="text" size="40"
maxlength="40">. That will limit the input to 40 characters
"Limit" is too strong a word, I think. A cooperative browser will prevent
ordinary users from entering more than 40 characters. But, a hostile user
can easily use a noncooperative browser and/or a script to submit more data
than that to the server.

The internet being what it is, hostile users are in abundance, so depending
on the browser to enforce this so-called "limit" is a Very Bad Idea. By all
means, do include it - it's far more convenient for ordinary users to have
their browser limit their typing, than to submit the form and have an error
page come back. Just don't depend on it; double-check on the server to make
sure the browser did the right thing.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Jan 21 '07 #4
Gazing into my crystal ball I observed "SSG" <ss****@gmail.comwriting in
news:11**********************@l53g2000cwa.googlegr oups.com:
I have text area having 4 rows & 10 cols.. while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...

Hw to create text area like that....
As others have said, textarea should not be limited, but in the real world,
where there are real bosses who think otherwise ....

There are some nice javascripts that deal with that, some even have a nice
little box that shows how many characters are left.

It is vital that you check the actual length server side. There is nothing
more disconcerting than "field would be truncated" (and of course it never
tells you WHICH field, but you already knew that).

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Jan 22 '07 #5
Sherm Pendley wrote:
Chris Beall <Ch*********@prodigy.netwrites:
>SSG wrote:
>>I have text area having 4 rows & 10 cols.. while I am typing in
Textarea , it should not accept the 5 th row & 11 th col...

Hw to create text area like that....
You could replace the textarea with <input type="text" size="40"
maxlength="40">. That will limit the input to 40 characters

"Limit" is too strong a word, I think. A cooperative browser will prevent
ordinary users from entering more than 40 characters. But, a hostile user
can easily use a noncooperative browser and/or a script to submit more data
than that to the server.

The internet being what it is, hostile users are in abundance, so depending
on the browser to enforce this so-called "limit" is a Very Bad Idea. By all
means, do include it - it's far more convenient for ordinary users to have
their browser limit their typing, than to submit the form and have an error
page come back. Just don't depend on it; double-check on the server to make
sure the browser did the right thing.

sherm--
SSG,

Sherm is absolutely correct. ANY data from a form should be validity
checked within the CGI code that processes the form. Checks should
include min-max length, code points used, value ranges, etc. The checks
should ensure that the CGI code itself will not fall apart, and should
further ensure that any downstream process (database, HTML written back
to the user) will not either fail or cause bad things to happen (such as
user input becoming executable JavaScript embedded in echoed HTML).

When processing user data, paranoia is essential.

Chris Beall
Jan 22 '07 #6

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

Similar topics

7
by: Cues Plus | last post by:
Hello, I have a simple form text area for people to add comments in. The problem is that using the standard <TEXT AREA NAME="comments" ROWS=4 COLS=35></TEXT AREA> Allows people to put in...
2
by: Lloyd | last post by:
I am trying to insert text in a text area. I need to insert one set of values on the left side of the text area and have corresponding values on the left side of the text area in an even column....
6
by: SRafiq | last post by:
Hi I need help with a topic I have an html page and in it i have a textarea which can have a multiple of info, is there any possible way that i can out put a specific area of the textarea using...
1
by: harikca | last post by:
I have the following html code: <html> <head> <title> Node Entry</title> </head> <body> <form action="sqlconnect.php" method="post"><table border="5"> <tr> <td><textarea rows=3 cols=70...
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
1
by: truptidalia | last post by:
Hello, I am trying to add 2 RadioButtons in a form in js dynamically. I can see 2 radiobutttons, but no text. On clicking them, their is no selection. One of them is selected. I need to...
6
by: David Stone | last post by:
I have a simple question about the alt content of area elements within an image map: is it redundant to include phrases such as "link to..." or "jump to..."? My initial thought is 'yes', since...
4
by: high | last post by:
hi, im new to this platform, i have been creating a web page using MS Front page and i need to insert a text area to give the input and another text area to store that, <form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.