close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Maximum character or character counter

Thread began 5/04/2010 8:11 am by info395053 | Last modified 5/18/2010 3:43 pm by Jimmy Wu | 2204 views | 3 replies |

info395053

Maximum character or character counter

Hi,

I want to limit the number of characters that can be inputted into the field with the text editor - like you can on an ordinary textarea. I've already added webassist's client validation with max. characters, but that only tells the user when they go to submit the form and doesn't tell them how many characters they've entered. I also tried adding a third party javascript character counter but it didn't work as it doesn't recognise the filed as a textarea.

Can anyone recommend a solution, either to stop the input after xx characters or add a character counter to the toolbar.

Thanks in advance, all suggestions welcome!

Sign in to reply to this post

Jimmy Wu

It seems a lot of people have run into the same issue using fck editor and trying to limit the characters or have a character count for it:
#hl=en&source=hp&q=fckeditor+limit+characters&aq=0&aqi=g1&aql=&oq=fckeditor+limit&gs_rfai=&fp=ebb85e0c7c5b945c

We use FCK Editor to implement HTML Editor. One valid point is that when entering text and using the styling, that will add extra characters to the input and the character count will be off from just the text showing. This may confuse ordinary users.

I would recommend stating that there is a max length allowed added in the editor and explain to users that they should click on the code button to see how many actual characters there are and then limit the number of characters using the validation that you already have set up.

Sign in to reply to this post

wombat.56339078

Entities are the biggest hurdle!

All over people are trying to sort this but seem to be looking at it the wrong way.

I have successfully created a char length hook using another popular html editor which allows both ideal hook points not only for parsing but also 'when' (keyup or onchange etc), latter which can really bog down some entry points... yes, it MUST be tested on large bodies of html code not just a few lines!!

I discovered it was entity identification (reliable) and subsequent conversion as the final hurdle to updating a separate div box text count val on the page. Cleaning up the other stuff, I believe, is trivial (just attack it with a regX - or two!!).

Sorry I can't be more specific as I cannot use this HTMLeditor (iRite) because of the serial number issue I have mentioned elsewhere in the forums (frustratingly requiring online use every time despite being paid for) so therefore returning to the other manual editor implementation I have not sorted this issue for this JS software.

Maybe there's a clue there somewhere.

PS Edit:
At the end of the day so to speak naturally the most important stage is the POST data server side verification that counts (no pun) regarding data validation no matter what the client side scrubbing can do (which can be avoided by the user anyway).

PS PS Edit:
I forgot to add my bit re the blocking of chars beyond a predetermined length. As I wrote one can parse the char length and show perhaps a larger red font (ie) when a limit is reached and exceeded.

But as for blocking further entry I suggest as many have discovered even with plain-vanilla textareas that one shouldn't bother; all methods have been tried. What happens is some visitors are guaranteed to be frustrated by...

1) the weird results the different applications of char limiting cause with the cursor ending up all over the joint...
or
2) a cursor, however placed (on purpose or accidentally) in the middle of the already set texts causes weird and not so wonderful results when a key is pressed.
and
3) it is very difficult (there are JS thingies to try and do it) to CUT the body text at a suitable place BETWEEN html tags and repair any tag "pairs" that would be affected too!!

So if sale conversions or important messages etc are hoped for, DON'T play with char length blocking. Just let them know visually the entry as it is will be truncated.

Hope that helps.

Regards.

(my programs never contain bugs, but do occasionally include FREE undocumented extras)

Sign in to reply to this post

Jimmy Wu

Thanks for posting back with your experiences. I'm sure they will help other users who have similar issue with implementing a counter, even though you worked on it with another editor instead.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...