Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 4th, 2005, 10:34 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old May 4th, 2005, 12:46 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

Reply With Quote
  #3 (permalink)  
Old May 4th, 2005, 01:53 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old May 4th, 2005, 11:31 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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().


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 07:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.