I have an array of dates. The code below loops over the dates to print out an the dates with text fields. What I'm trying to do is create an array of text fields which has unique ID's. Then pass each dates with its array text field (values) into a php script.
Any ideas?
for (var i in dates) {
var d = dates[i];
if (d) { // sometimes the date is not actually selected, that's why we need to check.
var length = 12;
var str = i+d;
var myUniqueTime = str.substring(0,length);
myUniqueTime = myUniqueTime.replace(/^\s+|\s+$/g, '');
times= ["<input type=\"text\" id=\""+i+"\" size=\"8\" name=\""+i+"\" onChange=\"changeTimeTo24Hrs()\" value=\""+i+"\" />", "<input type=\"text\" id=\"times\" size=\"8\" name=\"times\" value=\""+i+"\" />"];
// OK, selected. Fill an input field. Or something. Just for example,
// we will display all selected dates in the element having the id "output".
el.innerHTML += "I = " + i + "<br />" + times + "<br />" + d.print("%A, %Y %B %d") + " <font size='-1'>" + myUniqueTime + "</font><br /><BR />";
}
}