1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
...
function wfd_%s_update_linked(date)
{
jQuery("#%s").val(parseInt(date.substring(0, 4), 10));
jQuery("#%s").val(parseInt(date.substring(5, 7), 10));
jQuery("#%s").val(parseInt(date.substring(8), 10));
wfd_%s_submit();
}
function wfd_%s_check_linked_days()
{
var daysInMonth = 32 - new Date(jQuery("#%s").val(), jQuery("#%s").val() - 1, 32).getDate();
jQuery("#%s option").attr("disabled", "");
jQuery("#%s option:gt(" + (%s) +")").attr("disabled", "disabled");
if (jQuery("#%s").val() > daysInMonth)
{
jQuery("#%s").val(daysInMonth);
}
wfd_%s_submit();
}
function wfd_%s_submit () {
var jour = jQuery("#%s").val();
if (jour.length == 1) jour = '0' + jour;
var mois = jQuery("#%s").val();
if (mois.length == 1) mois = '0' + mois;
var annee = jQuery("#%s").val();
var date = jour + '/' + mois + '/' + annee;
jQuery.post("main/getdata",
{selectJour : jour, selectMois : mois, selectAnnee : annee},
function(data)
{
jQuery("#getdata").html(data);
});
} |
Partager