Hi... i'm new in using Joget \:)

Yesterday I've tried to create a form with the addition of the Custom HTML. I use the Custom HTML to initialize the input date. But the code I made does not give any effect (input date field is not filled by the system date), but the alert show me the system date. The following is the code that I enter into the custom HTML :


{code}<script language="JavaScript" type="text/javascript">
$(function() {
	$('document').ready(function() {
                var currentTime = new Date();
		var month = new Array(12);
		month[0]="Jan";
		month[1]="Feb";
		month[2]="Mar";
		month[3]="Apr";
		month[4]="May";
		month[5]="Jun";
		month[6]="Jul";
		month[7]="Aug";
		month[8]="Sep";
		month[9]="Oct";
		month[10]="Nov";
		month[11]="Dec";
                var monthName = month[currentTime.getMonth()];
                var day = currentTime.getDate();
                var year = currentTime.getFullYear();
                $("input[name=inputDate]").attr("value",day+'-'+monthName+'-'+year);
                alert($("input[name=inputDate]").val());
	});
});
</script>{code}

Any suggestion how to initialize some input field?


<script language="JavaScript" type="text/javascript">
$(function() {
&nbsp;&nbsp; &nbsp;$('document').ready(function() {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var currentTime = new Date();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var month = new Array(12);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[0\]="Jan";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[1\]="Feb";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[2\]="Mar";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[3\]="Apr";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[4\]="May";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[5\]="Jun";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[6\]="Jul";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[7\]="Aug";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[8\]="Sep";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[9\]="Oct";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[10\]="Nov";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;month\[11\]="Dec";
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var monthname = month\[currentTime.getMonth()\];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var day = currentTime.getDate();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var year = currentTime.getFullYear();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $("input\[name=tanggalCMH\]").attr("value",day+'-'+monthname+'-'+year);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert($("input\[name=tanggalCMH\]").val());
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //alert($("textarea\[name=komentarCMH\]").val());
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $("textarea\[name=komentarCMH\]").css("display","none");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $("textarea\[name=komentarCMH\]").val("coba ajah,.. ini asli dari jquery loh");
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //alert($("textarea\[name=komentarCMH\]").val());
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;//$("textarea\[name=komentarCMH\]").css("display","block");
&nbsp;&nbsp; &nbsp;});
});
</script>