It has worked, thank you very much.

Add it in the script declaration in case someone needs it.
$document->addScriptDeclaration('
jQuery(function($){
$("#askform").validationEngine("attach");
$("#comment").keyup( function () {
var result = $(this).val();
$("#counter").val( result.length );
});
});
jQuery(function($) {
$(function() {
$("form#askform").on("submit", function() {
$(this).find(":submit").attr("disabled", true);
});
});
}); ');