Gossamer Forum
Home : Products : DBMan : Discussions :

want to count characters in Description field??

Quote Reply
want to count characters in Description field??
I want to count the number of characters typed in 'Description' field and get them added to database..

Please help me, otherwise the my whole project is going to flop.

Zeshan.Blush
Quote Reply
Re: [zeshan] want to count characters in Description field?? In reply to
"need more input"

Are you referring to when the "link owner" adds a record? If so, you could use a javascript counter. See http://www.dynamicdrive.com/...dex16/limitinput.htm


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] want to count characters in Description field?? In reply to
Thanks a lot for prompt response. But it's not what I want.

I don't want to limit them. What I want is ...

Let them add the characters ..as much as they want no limitations, but when they add the record to database. The character count should also be submitted along with other fields.

That's all.

Thanks.

Zeshan.
Quote Reply
Re: [zeshan] want to count characters in Description field?? In reply to
OK.

Quote:


The character count should also be submitted along with other fields.


And how is it to be submitted? Do you have a field in the link.db file to put the character count into? Is is a perl variable for later use in the add process?


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] want to count characters in Description field?? In reply to
I have defined a field in .config file and also in the html_record_form and html_record in the html.pl.

But how I am going to get the character count from the "description" field and inserted into this field automatically?
Quote Reply
Re: [zeshan] want to count characters in Description field?? In reply to
well, try this

my $char_count=length($rec{'Description'});


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] want to count characters in Description field?? In reply to
In which file?

Config file?

db.cgi?

or html.pl

Sorry I Know I am bothering you continuously,

thanks,

Zeshan.
Quote Reply
Re: [zeshan] want to count characters in Description field?? In reply to
since I not sure what you are doing with it, it's hard to say.

probably in html.pl at the bottom of html_record_form

Code:
</TABLE>
|;
my $char_count=length($rec{'Description'});
}


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."