2 questions...

This is a discussion on "2 questions..." within the Classic ASP section. This forum, and the thread "2 questions... are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 25th, 2005, 18:24
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
2 questions...

1) how can i limit a textarea to 200 characters only? and
2) how can i capture line breaks that people enter? so that when it goes into the database and gets read back, the line breaks are automatically entered?

  #2 (permalink)  
Old Apr 25th, 2005, 19:10
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Hi ben...

To answer you first question, you will need either a javascript or some server side for validation of the length as maxlength is not a parameter you can pass the textarea (unlike input elements)

For display of the databased content, you can use:-
Code: Select all
content = replace(content,vbcrlf,"
")
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #3 (permalink)  
Old Apr 25th, 2005, 20:02
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
thanks very much rob
  #4 (permalink)  
Old May 6th, 2005, 18:47
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
hey rob... is there anyway to reverse this? I want to put the value in the database back into a <textarea> to be able to make it editable again - however, i dont want the
to appear in the textarea, i just want a line break...? is that possible?
  #5 (permalink)  
Old May 6th, 2005, 19:52
Junior Member
Join Date: Apr 2005
Location: Canada
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Thooks like you'd just do the following to put it back in the text area.

Code: Select all
content = replace(content,"
",vbcrlf)
And then write content into the value of the text area.
  #6 (permalink)  
Old May 6th, 2005, 21:25
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
To be honest, why bother?

Just store in the database without all the markup (lets face it, it save space)
and then make your
elements, etc before outputting to the page.
You also wont have to bother converting to/from textarea elements.

This in my opinion is the most logical way.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Closed Thread

Tags
questions

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello To All (Got Any Questions?)!! benuk83 Introduce Yourself 3 Mar 24th, 2008 17:17
hi and questions linn Introduce Yourself 9 Jan 4th, 2007 23:55
A few questions Travis R Web Page Design 6 Oct 6th, 2006 19:06
Questions!!! craig Webforumz Suggestions and Feedback 27 Dec 8th, 2005 10:59
What questions do you ask? gSmith Introduce Yourself 3 Oct 1st, 2005 08:12


All times are GMT. The time now is 20:53.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43