I am using the charscounter plugin (fckplugin.js) to count the number of characters and trying to use an alert to display a message when the character limit is reached.But there seems to be some problem displaying the alert in fckplugin.js.
The code is as shown below:-
this.LeftChars = this.MaxLength - this.TextLength;
// Update value in the external counter, if defined.
this.Counter = FCK.LinkedField.form[this.CounterName];
this.Counter.value = this.LeftChars ;
if ( this.LeftChars <= 1 ) {
this.Counter.value = 0;
alert('Limit exceeded');
return false;
}
The code is as shown below:-
this.LeftChars = this.MaxLength - this.TextLength;
// Update value in the external counter, if defined.
this.Counter = FCK.LinkedField.form[this.CounterName];
this.Counter.value = this.LeftChars ;
if ( this.LeftChars <= 1 ) {
this.Counter.value = 0;
alert('Limit exceeded');
return false;
}