Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 02:08 pm EST

Geeklog Forums

Limiting characters in introtext


Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
Could someone please tell me have to limit text in the introtext field? I tried 'maxlength,' but that didn't seem to work...
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
I wish it were as easy as adding maxlength to the textarea element. Instead, you have two options:

1) Hardcode the length of the intro text via the database. This solution isn't very good as it will just drop the end of text that is too long.

2) Do some Googling for javascript that adds this functionality. I did a little and this is the first thing I found:
http://www.bigwebmaster.com/1741.html
 Quote

Status: offline

lestat

Forum User
Chatty
Registered: 11/15/03
Posts: 64
Just wanted to thank you. It worked out great.
 Quote

All times are EST. The time is now 02:08 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content