Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Form character Counter
Old 03-11-2006, 07:36 PM Form character Counter
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hi All.

Was wondering if anyone could steer me in a direction of how to accomplish this.

I want to emulate somthing that a company I worked for had on one of their
pages.

They had a form field for input. Right next to it there was a character countdown
that let you know how many characters were left to use.

For instance if the form field was set to take 250 characters for instance. As you
typed the figure decreased to show you how many characters were left. And it
did this in real time.

The pages were asp so I am assuming that is what they used. but, I guess they
may have had a javaScript running on the page as well.

Any suggestions as to the best way to accomplish this?


Thanks, Chip
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
 
Register now for full access!
Old 03-11-2006, 09:09 PM Re: Form character Counter
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
Google brought me this nifty little javascript...
http://www.dynamicdrive.com/dynamici...imitinput2.htm
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 03-12-2006, 01:56 AM Re: Form character Counter
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
eDan - Thanks - works like a charm..!
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 03-12-2006, 10:16 PM Re: Form character Counter
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
Sweet, im glad i could help!! Oh btw... nice avatar
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 03-12-2006, 11:16 PM Re: Form character Counter
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Hey Dan, Just noticed you are in Georgia.. Me and my wife just moved to Savannah about 2 months ago.. We love it!
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 03-13-2006, 03:43 PM Re: Form character Counter
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
That's a cool script Dan found.

But one caveat: for the non-JS types, you may want to have a validation check once the form input is gathered.

e.g.
Code:
Dim Your_Field
Your_Field = Request.Form ("Your_Field")
if len (Your_Field) > 250 then
    '  Do whatever since the field is too long.
end if
It never hurts to cover your ***.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-14-2006, 03:22 PM Re: Form character Counter
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
Good catch ADAM
I like to do server side validation too and am not very fond of JS.

waaaay off topic
Hey Chip!! Welcome to the "dirty south"... It's a small world! Even though I live here, I dont think of it as home. I prefer the cool dry weather of the west. Savannah is a nice place though, I'm in Columbus----> directly across the state from you.
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin

Last edited by ExpressoDan; 03-14-2006 at 03:24 PM..
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Reply     « Reply to Form character Counter
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31096 seconds with 12 queries