can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r10061: LJINT-407: Disable submit

Committer: dpetrov
LJINT-407: Disable submit
U   trunk/htdocs/js/partners/placeholder.js
Modified: trunk/htdocs/js/partners/placeholder.js
===================================================================
--- trunk/htdocs/js/partners/placeholder.js	2011-02-17 07:20:16 UTC (rev 10060)
+++ trunk/htdocs/js/partners/placeholder.js	2011-02-17 07:53:51 UTC (rev 10061)
@@ -17,6 +17,14 @@
 				submitButtons.attr('disabled', 'disabled');
 			}
 		});
+
+		//disable submit controls if comment is empty
+		var commentText = $('#commenttext');
+		if(commentText.length > 0) {
+			commentText.input(function() {
+				submitButtons.attr('disabled', this.value.length === 0 );
+			}).trigger("input");
+		}
 	});
 	
 	$.fn.placeholder = function () {

Tags: can3p, js, ljcom
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments