In Focus
Kolkata Chapter Developer Day: May 25
C# Corner Delhi Chapter Meet, May-18, 2013 Official Recap
Istanbul Chapter May 2013 2nd Seminar Announced : Learn WinJS, Windows Store, MVC
ANNOUNCEMENT: April 2013 Month Winners
Email :
Password :
Remember me?
Forgot password
Contribute
An Article
A Blog
A News
A Video
A Link
An Interview Question
Ask a Question
TECHNOLOGIES
.NET 4.5
Current Affairs
Learn .NET
SharePoint 2010
Web Development
.NET Assemblies
Databases & DBA
LightSwitch 2012
SharePoint 2013
Web Services in C#
ADO.NET in C#
Design & Architecture
LINQ
Silverlight with C#
Windows 8
AJAX in C#
Exception Handling C#
Mobile & Embedded
Smart Devices
Windows Azure
Android Programming
Graphics Design
Office 2013
SQL
Windows Controls C#
Articles C#
Hardware
OOP/OOD
SQL Server 2012
Windows Forms C#
ASP.NET Controls in C#
How do I
Operating Systems
Testing
Windows Phone 8
ASP.NET MVC with C#
HTML 5
PHP
TypeScript
Windows Server 2012
ASP.NET Programming
Internet & Web
Products
Visual C#
Windows Store Apps
C# Language
iPhone/iPad
Project Management
Visual Studio .NET
Workflow Foundation in C#
C# Tutorials
Java
Reports using C#
Visual Studio 2010
WPF
C, C++, MFC
Java and .NET
Robotics & Hardware
Visual Studio 2012
XAML
Career Advice
JavaScript, CSS
Security in .NET
WCF with C#
XML
Chapters
JQuery
Request a new Category
|
View All
ANSWERS
BLOGS
VIDEOS
INTERVIEWS
BOOKS
LINKS
NEWS
CHAPTERS
CAREER ADVICE
Making your Web Browser in C#
HTML 5 vs Native Apps
Secure Your Android Application from Hackers
Why to fear Object Oriented Programming approach
Check upcoming B'day in Asp.net
Happy Birthday Destin Joy
Compare strings using StringComparison.Ordin ...
Class vs Structure
Get The Value From DataGridView To TextBox On c#
Access Master Page Control In Child Page
Blog
JQuery Maxchars Plugin
Posted by
febin JS
in
Blogs
|
JQuery
on
Dec 01, 2010
JQuery Maxchars Plugin
Tweet
2080
0
0
Had a glance on JQuery's new feature, thought of sharing this with you - "Maxchar" plugin. I found this plugin very useful since we are using similar kind of sinareos in our projects, I think this might be helpful for you guys also.
As there are many senarios where we have to restrict characters in our UI controls, so usually we go for a UI property maxLength or some custom jQuery methods for doing like that as we had done in our Projects Mylo & others. But now JQuery had released Maxchar plugin so that its very simple to use.
This plugin is freely available in net:-
http://www.unleashed-technologies.com/projects/maxchars/jquery.maxchars.0.0.zip
How to use this plugin is elaborated by some examples below :-
Suppose in our page we have a textArea [id="description"], for that we have to limit the character upto 400.
$('#discription').maxchars(400);
The basic syantax of this is
$('#elementID').maxchars(options);
We can also define similar options by using this single code ie for example
$('#discription').maxchars({
maxchars: 400,
showExtraChars: true,
messageHolder: $('div.messagebox') });
Here
maxchars:- Its the maximum number of characters that can be given inside a particular control , if this is blank it will take the html maxlength property value by default.
showExtraChars:- Its a boolean value , if set to true we can type extra characters inside the control. but if false it will automatically delete the extra characters what we have entered into the control.
messageHolder:- It will hold the control where we can show the remaining characters.
This Feature is Sponsored By
DynamicPDF Merger is a developers dream for interacting with any existing PDF documents. Merge, append, split, form fill, flatten stamp and so much more.
Mouse Hover Fadding Effect
JQuery script to get nice style on a button
post comment
COMMENT USING
PREMIUM SPONSORS
iPhone, Android & Web Development Services
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
More Blogs from this Blogger
JQuery Maxchars Plugin
jQuery.Spritely Plugin
Workaround for handling HTTP Error 500.21- Internal Server Error
Named and Optional Parameters (New features in c# 4.0 Part -1)
View All
SPONSORED BY
DynamicPDF ReportWriter Suite
PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Follow @twitterapi
Latest Blogs
Import Email from Gmail in ASP.NET
Difference between IEnumerable and IEnumerator
How to get thumbnail image from youtube embed code
Spilit Letter Of Word From String in SQL Server
Install Ajax control Toolkit in Visual Studio 2008
How to highlight grid view row and change row color on mouse over and Check box selection in ASP.NET
LEN and DATALENGTH Function in SQL Server
TextBox validation using JQuery
Android Studio not Starting Up After Installation
Check upcoming B'day in Asp.net
View All
Poll
Result
All Polls
What is the best product to build Mobile apps?
What is the best product to build Mobile apps
PhoneGap
Icenium
Xamarin Studio
KendoUI Mobile
JQueryMobile
Native iOS/Android
What is the best product to build Mobile apps
Options
Votes
%
PhoneGap
0
0.00
Icenium
0
0.00
Xamarin Studio
0
0.00
KendoUI Mobile
0
0.00
JQueryMobile
60
90.91
Native iOS/Android
6
9.09
Total
66
100%