Sorry for the very late reaction

but there were some problems with the code, so i totally rewrited it and now it supports multiple words. Here is the code:
<script type="text/javascript">
<!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ -->
// Variables and handler configuration
var word = new Array(), Letter = new Array(), Code;
document.onkeypress = check_key;
// Forebidden Words
word[0] = "FOREBIDDEN WORD";
word[1] = "FOREBIDDEN WORD";
word[2] = "FOREBIDDEN WORD";
word[3] = "FOREBIDDEN WORD";
// Reset Counters
for (i = 0; i < word.length; i++) {
Letter[i] = 0;
}
// Event handler
function check_key(key) {
try {
Code = event.keyCode;
} catch(e) {
Code = key.which;
}
for (i = 0; i < word.length; i++) {
if (String.fromCharCode(Code).toLowerCase() == word[i].charAt(Letter[i])) {
Letter[i]++;
} else {
Letter[i] = 0;
}
if (Letter[i] == word[i].length) {
Letter[i] = 0;
trigger(word[i]);
}
}
}
// IF the word has been typed
function trigger(word) {
alert("You have used a word that this site has recognized as inappropriate. Continuing may cause an admin to take disciplinary action upon your account. Are you sure you want to continue? You typed: " + word);
}
</script>
EDIT:
Oops, forgot to tell, put in the header, and I placed a previeuw on my forum, just type a word you think inapropiate, and seeJust replace FORBIDDEN WORD with the words you don't allow, and if you want more words just enter more of this:
word[X] = "FOREBIDDEN WORD";
Replace the X with the correct number in the forbidden words list.
The message you wanted to appear: You have used a word that this site has recognized as inappropriate. Continuing may cause an admin to take disciplinary action upon your account. Are you sure you want to continue? has already been included. I have also added a function that will show you what word you typed.|
Thanks,
Qub1 out~