Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

TextField rows

Posted on 2004-09-21
5
186 Views
Last Modified: 2010-04-25
Is there a way to restrict the user from entering more than a certain number of rows in a TextField? I would like the user to be able to enter only 4 lines of data and that too with a specified number of columns.

I have set the properties in Dreamweaver, Num Lines to 4, but that does not seem to restrict the user.

Any idea what i am doing wrong or can do differently to do this right???

KM
0
Comment
Question by:KalluMama
  • 2
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
Esopo earned 400 total points
ID: 12114388
Hi KM,

>>Num Lines to 4, but that does not seem to restrict the user<<
You are right, it doesn't. It only tells the page how big you want the textarea to be.

A textarea can't be restricted through HTML code, you would need some scripting to do that.
While in the proccess of getting you such script I realized there is a much simpler solution for you:


>> I would like the user to be able to enter only 4 lines of data and that too with a specified number of columns<<

If you are this sure about the exact amount of information you spect from your users, then you should go with one line textfields:

*************************
<input name="textfield" type="text" size="50" maxlength="50">
  <br>
  <input name="textfield2" type="text" size="50" maxlength="50">
  <br>
  <input name="textfield3" type="text" size="50" maxlength="50">
  <br>
  <input name="textfield4" type="text" size="50" maxlength="50">
*************************

These are four lines of text input limited to 50 chars each. Easy and no scripting required (at least for this part).

Best regards,

Esopo.
0
 

Author Comment

by:KalluMama
ID: 12123241
i needed all the info in one box....
0
 
LVL 2

Expert Comment

by:whitefael
ID: 12123323
Just so I can understand the problem a little better, what kind of data are the users entering that it must be entered in one text box? Unless you have some out of the ordinary situation, Esopo's suggestion is probably the best way to do it using HTML only.

Brian
0
 

Author Comment

by:KalluMama
ID: 12123392
The data being entered is just plain text...stored as Memo in access.
0
 
LVL 2

Assisted Solution

by:whitefael
whitefael earned 100 total points
ID: 12127396
If the data is being written to the Access database, I would just follow what Esopo wrote. Next, the Submit button should link to a page that processes the data, like process.asp (I'm assuming you're using ASP pages since you are working with the Access database). The VBScript in this page would take the four strings and combine them into one string. Then you just connect to your database and write the single string into the Memo field.  If successful, process.asp will display some kind of "Your data was successfully entered." or whatever you want to say.

It's been many, many years since I've even looked at ASP, so maybe someone else can provide you with the code. If you're working with the database, you may already know how to do this.

Hope this helps!
Brian
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dreamweaver User Authentication Problem 13 703
ColdFusion dropdown multiple select question 3 647
Site contents shift off page in IE 32 130
Dreamweaver CS6 with WordPress 9 119
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question