Print Page | Close Window

Maximum Length of Content for the RTE

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=20750
Printed Date: 29 March 2026 at 4:18pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Maximum Length of Content for the RTE
Posted By: markdinho
Subject: Maximum Length of Content for the RTE
Date Posted: 20 July 2006 at 1:17am
I have used the RTE to upgrade my standard Text Areas. My old Text Areas had an OnKeyUp Event which called a Javascript function called CheckMax:
 
onKeyUp="checkMax(this.form)"
 
This Javascript function basically checked that the input was no longer that 8000 characters. It would update a textBox on the Form to indicate how many characters are left.
 
Here is the Javascript Function:
function checkMax(j){
    intMaxLen = 8000
    if (j.txtIssueNotes.value.length <= intMaxLen) {
         intCharsLeft = intMaxLen - j.txtIssueNotes.value.length
    }
    else {
          j.txtIssueNotes.value = j.txtIssueNotes.value.substring(0,intMaxLen) intCharsLeft = 0
     }
     j.txtCharsLeft.value = intCharsLeft
}
 
 
The problem is now that with the RTE controlling the TextArea, this no longer works.
Any ideas on how I could get it to work again?
 
Thanks



Replies:
Posted By: WebWiz-Bruce
Date Posted: 20 July 2006 at 9:10am
Such a system isn't really possiable in an RTE area.

The reason for this is that the RTE uses also HTML to format the text which would also be counted even though the end user can not see this.

The other problem, is that the RTE actually uses an IFrame to make it work, which is overlayed over the top of the original text area (otherwise the entire would become editable). Your original textarea is only populated (updated) when the submit button is pressed to submit the form.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net