Code:
function getNumbers(date) {
var calRE = getFormat();
var y, m, d;
if (calRE.test(date)) {
var yIdx = calFormat.search(/yyyy/i);
var mIdx = calFormat.search(/mm/i);
var m3Idx = calFormat.search(/mon/i);
var dIdx = calFormat.search(/dd/i);
y=date.substring(yIdx,yIdx+4);
if (mIdx != -1) {
m=date.substring(mIdx,mIdx+2);
}
else {
var mm=getMonthFromName(date.substring(m3Idx,m3Idx+3))+1;
m=(mm<10)?("0"+mm):(""+mm);
}
d=date.substring(dIdx,dIdx+2);
return new Array(y,m,d);
}
else {
return new Array("", "", "");
}
}
if i have two trios of select lists[day/mo/yr] (so two links for select date dialog boxes) how i call the above function for the two ?
how i assign results to
document.forms.book.day.value = ????
document.forms.book.month.value = ????
document.forms.book.year.value = ????
document.forms.book.day2.value = ????
document.forms.book.month2.value = ????
document.forms.book.year2.value = ????
how this assignments trigered when close the "select date" dialog box ?
Bookmarks