/* Created by HolySavior of iFusion Hows My Post v1 ZB This may not be Edited at all! */ function word_count() { var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0; for(i=0;i 0) count++; var iObj = document.getElementById('count'); iObj.innerHTML = "
"+ count+" words
"; if(count >= 200){ iObj.innerHTML += "Hows My Post? Excellent Post!"; }else if (count >=100){ iObj.innerHTML += "Hows My Post? Halfway there!"; } else if(count < 99){ iObj.innerHTML += "Hows My Post? You can do better than that!"; } } function check_count(){ var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0; for(i=0;i 0) count++; if(count < 200){ return confirm("Post Length Alert!!\r\n\r\nYour post has only " + count + " words. Are you sure you want to add it?"); } } var hows_my_post = { init: function(){ if(location.href.match(/post/) || location.href.match("msg")){ document.getElementById("c_post").innerHTML += "
Hows My Post?
"; } if(document.forms['posting']){ if(document.getElementById('count') ) document.forms['posting'].post.onkeyup = function(){ word_count(); } if(location.href.match("mode=")){ document.forms['posting'].post_submit.onclick = function(){ return check_count(); } } if(location.href.match("msg")) { document.forms['posting'].submit.onclick = function(){ return check_count(); } } } } };
Welcome Guest [Log In] [Register]
Make New Topic
General Discussion
No topics were found.
1 user viewing this forum (1 Guest and 0 Anonymous)
Members:
 
Make New Topic