The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Word counter while posting?

View previous topic View next topic Go down

Word counter while posting?

Post by iTzLawliet on February 16th 2014, 6:28 am

I know that there are codes for word counters in the widgets but I need one for in the actual forums while a user is posting. As they type their post, they are able to see just how many words they have typed so far before they post. Is there a code for this?

iTzLawliet
Forumember

Female Posts : 32
Reputation : 1
Language : English

Back to top Go down

Re: Word counter while posting?

Post by Tonight on February 16th 2014, 7:01 am

Code:
$(function(){varn="0";iframe=$('.sceditor-containeriframe');$('#text_editor_textarea').before('CharactersWritten:<spanid="characters">'+n+'</span>');$("#textarea_content").on('keyup',function(){vara=$(".sceditor-containertextarea");varb=$('#characters');varc=a.val().length;b.html(c);if(a<1)b.html('0');});$('body',iframe.contents()).on('keyup',function(){vara=$('body',iframe.contents());varb=$('#characters');varc=a.text().length;b.html(c);if(a<1)b.html('0');});});

Tonight
Forumember

Male Posts : 241
Reputation : 63
Language : Estonian, English, Russian
Location : Estonia

Back to top Go down

Re: Word counter while posting?

Post by iTzLawliet on February 16th 2014, 2:55 pm

Is that supposed to go in the CSS? Because I tried that and it said that it was invalid coding...

iTzLawliet
Forumember

Female Posts : 32
Reputation : 1
Language : English

Back to top Go down

Re: Word counter while posting?

Post by SLGray on February 16th 2014, 4:23 pm

Administration Panel > Modules > HTML/JavaScript > JavaScript Management
Make sure that it activated. Create a new JavaScript and check the box for in topics.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36748
Reputation : 2449
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum