Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Max Characters In RTE?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedMax Characters In RTE?

 Post Reply Post Reply
Author
crowandazi View Drop Down
Newbie
Newbie


Joined: 30 July 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote crowandazi Quote  Post ReplyReply Direct Link To This Post Topic: Max Characters In RTE?
    Posted: 19 September 2007 at 2:21pm
Howdy!  This RTE is great stuff, but I do have one question:  Is there any way to limit the number of characters that the RTE will submit as part of the form?

I am dumping the contents of this textarea into a database field that is limited to 7000 characters.  This seems like a lot, but after all of the html formatting and a really long-winded post, this could run out.

I know this is complicated by the fact the the RTE needs to close all html tags before calculating the final character total, but is there any way to do this?  Thanks!
Back to Top
crowandazi View Drop Down
Newbie
Newbie


Joined: 30 July 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote crowandazi Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2007 at 2:33pm
BTW, I found a Javascript function that calculates remaining character totals on the fly, and it works...  but not when the RTE is functioning on the form.  I'm sure it has something to do with the textarea's identity being changed when the RTE is functioning.  If you can offer some insight into how this script could be adapted, it might help:

Script (simply displays the number of remaining characters into a text field):
<SCRIPT LANGUAGE="JavaScript">
function textCounter(field,cntfield,maxlimit) {
cntfield.value = maxlimit - field.value.length;
}
</script>

Text Area:
<textarea id="EntryText" name="EntryText" cols="75" rows="25" onKeyDown="textCounter(document.myForm.EntryText,document.myForm.remLen1,7000)"
onKeyUp="textCounter(document.myForm.EntryText,document.myForm.remLen1,7000)"></textarea>

Field Where Remaining Character Count Is Displayed:
<input readonly type="text" name="remLen1" size="25" maxlength="25" value="7000">
characters left
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2007 at 2:56pm
There is not a limitation built into the Web Wiz RTE, it can handle as many characters as the server can handle.

If you are using ASP then the limit on how much you can submit is the size of the ASP Response Buffer which can hold 100KB.

The Response Buffer holds allot of information such as the contents of your form, any cookies set by your site, the users web browsers headers, and many other things, so being able to calculate client side how much data will be passed to the Response Buffer is almost impossible and will be unique for each and every web site and each and every user.

The JavaScript you have above can not be adapted to work with the RTE as the RTE doesn't function as a textarea, it functions as a content editable IFrame.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.