Word Count
-
I have been trying to implement the word count javascript but it will not work for me. I did it exactly as posted.
First of all please add an additional attribute to the field, with the below info:Name – onchange
Value – myfunction(this)Then please enter for options > Javascript and add the below code there:
// before form submit
function myfunction(elem)
{var my_value = jQuery(elem).val();
if(my_value.split(” “).length > 2 ){
alert(‘message’);
jQuery(‘.button-submit ‘) .attr(‘disabled’, ‘disabled’);
jQuery(elem) .effect( “shake”, {}, 500 ).css(“background-color”,”#FF8F8B”).animate({backgroundColor: transparent}, {duration: 500, queue: false });} else{
jQuery(elem).css(“background-color”,”transparent”);
jQuery(‘.button-submit ‘) .removeAttr(‘disabled’);
}The page I need help with: [log in to see the link]
The topic ‘Word Count’ is closed to new replies.