Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Restrict Form Text Area to a max 200 charcters?

Posted on 2009-05-17
4
Medium Priority
?
389 Views
Last Modified: 2012-06-27
How do I restrict Form Text Area to a maximum of 200 charcters?
0
Comment
Question by:petewinter
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Answering4uAnt
ID: 24405639
maxlength = 200
0
 

Author Comment

by:petewinter
ID: 24405697
Does that mean the code should like this: <textarea name="why" cols="45" rows="5" id="why" maxlength="200"></textarea>

As I can still type more than 200 characters?
0
 
LVL 4

Accepted Solution

by:
Answering4uAnt earned 1000 total points
ID: 24405708
Sorry my error, maxlength doesn't work on textarea.
Try the link below, it has a counter and also alerts are XX characters have been entered, this should acheive what you require

http://inmyexperience.com/archives/000327.shtml
0
 

Author Closing Comment

by:petewinter
ID: 31582337
Many Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

885 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