Go Back   Webmaster Forum > Development > Programming > JavaScript
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
Minimum characters required for posting - 10-19-2007

Written for IPB1.3 / invisionfree

also hate those posts with only 1 word or something, with this code people their posts will need at least (any number here) characters before they can be posted

Original request: http://phantom-designs.net/index.php?showtopic=9843

Quote:
<script>
/*minimum characters per post
by godkillah from phantom-designs.net*/

var MinimumCharacters=15
var Message="Your post requires at least 15 characters"

if(location.href.match(/act=Post/i)){
document.forms.REPLIER.onsubmit=function(){
characters=document.forms.REPLIER.Post.value.lengt h
if(characters<MinimumCharacters){
alert(Message)
return false
}else{
return true
}}}
</script>
tested in Firefox
Reply With Quote
  # 2 (permalink)
Old
Newbie
Posts: 27
Join Date: Oct 2008
iTrader: (0)
1 Week Ago

thanks buddy, its very helpful and informative.

thanks for sharing
Reply With Quote
Reply


Thread Tools




vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com