|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
limiting # of characters for a multiline mode textboxHi just wondering if there is a way to limit the # of characters for a
multiline textbox? I am cutting it of in code but would like the user to know when they have exceeded the character limit, say 1000 for example. Thanks. -- Paul G Software engineer. Use JavaScript to count the number of characters entered into the textarea
(onkeypress event). When it reaches the max, cancel the keystroke. You could also alert the user. -- Show quoteHide quoteStaff Consultant II Enterprise Web Services Cardinal Solutions Group Future Business Model Loan Origination Services National City Mortgage "Paul" wrote: > Hi just wondering if there is a way to limit the # of characters for a > multiline textbox? I am cutting it of in code but would like the user to > know when they have exceeded the character limit, say 1000 for example. > Thanks. > -- > Paul G > Software engineer. thanks for the information, just wondering if you could provide a brief
example of what the code might look like. thanks. -- Show quoteHide quotePaul G Software engineer. "Michael Baltic" wrote: > Use JavaScript to count the number of characters entered into the textarea > (onkeypress event). > > When it reaches the max, cancel the keystroke. You could also alert the user. > > -- > Staff Consultant II > Enterprise Web Services > Cardinal Solutions Group > > Future Business Model > Loan Origination Services > National City Mortgage > > > "Paul" wrote: > > > Hi just wondering if there is a way to limit the # of characters for a > > multiline textbox? I am cutting it of in code but would like the user to > > know when they have exceeded the character limit, say 1000 for example. > > Thanks. > > -- > > Paul G > > Software engineer. in HTML for the Text box write a OnKeyDown or OnKeyPress function. In the
function count the length of text if more or equal to the length desired 'return false' or else 'return true' Show quoteHide quote "Paul" wrote: > thanks for the information, just wondering if you could provide a brief > example of what the code might look like. thanks. > -- > Paul G > Software engineer. > > > "Michael Baltic" wrote: > > > Use JavaScript to count the number of characters entered into the textarea > > (onkeypress event). > > > > When it reaches the max, cancel the keystroke. You could also alert the user. > > > > -- > > Staff Consultant II > > Enterprise Web Services > > Cardinal Solutions Group > > > > Future Business Model > > Loan Origination Services > > National City Mortgage > > > > > > "Paul" wrote: > > > > > Hi just wondering if there is a way to limit the # of characters for a > > > multiline textbox? I am cutting it of in code but would like the user to > > > know when they have exceeded the character limit, say 1000 for example. > > > Thanks. > > > -- > > > Paul G > > > Software engineer.
Render and Image on a Button
I guess this can't be done can it ? Unhappy call to a 2nd dataItem in ItemTemplate of an asp:TemplateC Webcontrol Designer Awareness... Re: accessibility and asp:button Tool to monitor/trace all method calls? WinForm as ASP.NET custom control Register directive for custom web control in VS 2005 Beta 2 accessing a specific cotrol from web DataGrid control. Textbox question (v2.0) |
|||||||||||||||||||||||