Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 4th, 2005, 10:34 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Limit the Size of String Input

Hi All,

I have an ASP form where users can paste their resumes, and then hit submit. When a user hit the submit, I want my ASP page to automatically delete everything that is over/after 300 characters long. Is there a way?

Thank you.

Leon

 
Old May 4th, 2005, 12:46 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Change the maxlength property of the textbox to 300.

300 characters for a resume seems a little small for a resume though.

 
Old May 4th, 2005, 01:53 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks for the info. I am using a "textarea" box instead of a text box. If you notice, textarea box does not allow you to set a maxlength limit. I have a javascript function that automatically delete anything after 300 characters, but the problem is that if you copy and paste into the field, the function does not work. If possible that I can do this using VBscript in ASP page, that'll be nice. Thanks.

Leon

 
Old May 4th, 2005, 11:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

You can use the Left() or Mid() functions to get the 300 chars you want. If you want to delete after the 300 you can also use Mid().







Similar Threads
Thread Thread Starter Forum Replies Last Post
User file size limit underscore10304 Windows Server 0 September 28th, 2006 06:57 AM
XML SIZE LIMIT Tristany SQL Server 2005 7 September 14th, 2006 01:01 PM
Compatibility DLL size limit? Yehuda Pro VB 6 10 June 10th, 2004 04:36 PM
how to limit the size of upload image? rockercheng Classic ASP Basics 1 August 8th, 2003 01:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.