geke hand
E Z B O A R D
Limit the Length of a Post

<< updated: 7/11/2003

Summary: Allows admins to limit the length of a post to a certain number of characters.

HEAD: (box #1)

<script type="text/javascript">
/* LIMIT NUMBER OF CHARACTERS IN MESSAGE */
function limitMessage(MAX) {
if (document.getElementsByName("body").length > 0) {
document.getElementsByName("body")[0].onkeyup = new Function ("if (this.value.length > MAX) { this.value = this.value.substr(0, MAX); }");
}
}
/* END LIMIT NUMBER OF CHARACTERS IN MESSAGE */
</script>

HEAD Notes:

This function does the work of limiting the length of the post.

FOOTER: (box #4)

<script type="text/javascript">
/* LIMIT NUMBER OF CHARACTERS IN MESSAGE */
limitMessage(300);
/* END LIMIT NUMBER OF CHARACTERS IN MESSAGE */
</script>

FOOTER Notes:

An example of limiting the message to 300 characters.

FOOTER: (box #4)

<script type="text/javascript">
/* LIMIT NUMBER OF CHARACTERS IN MESSAGE */
if (ezForum == "frm11") {
limitMessage(300);
}
/* END LIMIT NUMBER OF CHARACTERS IN MESSAGE */
</script>

FOOTER Notes:

An example of limiting the message to 300 characters, but only in forum #11 (frm11). This version requires that the ezURL script be installed in the HEAD.

History:

7/11/2003 - written by phalen180

Credits:

written by phalen180
suggested by Boxed Milkdud

E Z B O A R D

design by G E K E . N E T
best viewed in 1024x768 screen resolution using a standards compliant browser
logo based on a public domain drawing of a hand making the sign of the cross, no disrespect is intended
all other contents and code copyright © 2002-2005 jonathan cook

Valid HTML 4.01! Valid CSS!