Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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 Block
<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>

Any suggestions how to initialize some input fields?