Brent,

I had a similar problem. The 'MaxLength' property doesn't work for
multi-line textbox. Not ND's fault, but that of HTML, I guess.

What I did is to invoke a JavaScript function to truncate the field
'onChange' and tell the user 'Sorry, i had to do this'.

1. Set ExtraHtml Property of the textField to 
>>
 onChange= "checkLength(this,2000,'<A nice user-friendly name for the
field>')"
<<

>>>
function checkLength(textField, maxLength, fieldNiceName) {
      var n = textField.value.length; 
      if ( n > maxLength) {
         textField.value = textField.value.substr(0,maxLength);
         if (fieldNiceName == undefined)
            fieldNiceName = textField.name;
         alert(fieldNiceName+" : length truncated to "+maxLength+"
characters");
      }
}
<<<


Aby
TeamND 

> -----Original Message-----
> From: Brent Claxton [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 08, 1999 12:22 PM
> To: [EMAIL PROTECTED]
> Subject: [ND] How to limit size of HTML Text Box
> 
> 
> 
> I have an ND 4.1.3 HTML form which contains
> a text box.  The text box is bound to a 
> database column with a size of 2000
> characters.
> 
> Is there a way to prevent the user from
> entering more than 2000 characters in to the
> text box?  If not, is there a way to have
> the data object ignore the characters beyond
> the column max (simply)?
> 
> I have used the studio for most of the
> project so the updates are being done
> automatically.
> 
> Any help would be greatly appreciated.
> 
> Regards,
> 
> Brent Claxton
> Senior Developer
> Organization Metrics Inc.
> ______________________________________________________________
> ___________
> 
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: 
> http://www.netdynamics.com/support/visitdevfor.> html
> 
> For dire 
> need help, email: [EMAIL PROTECTED]
> 
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to